Sampled_color.b = tex2D(_TransferMap_Blue, float2(value, 0.5f)).a Sampled_color.g = tex2D(_TransferMap_Green, float2(value, 0.5f)).a Sampled_color.r = tex2D(_TransferMap_Red, float2(value, 0.5f)).a Output.pos = mul (UNITY_MATRIX_MVP, v.vertex) _Volume ("Volume (Scalar)", 3D) = "white" I did a same thing in cpp with opengl, i want to try it in unit圓d and use benefit of gui.Ĭode is down here, but it didn't work right.thanks for anyone's help, and sry for my poor english. That is, i pass the vertex's world position in vertexshader, and in fragment shader start ray marching to Z axis(i use ortho projection) to get sample position in world coordinate, then i need to calculate the world's coordinate to model's coordinate to get the sample( texture) position in a 3d texture, where i am stuck in now. I want to do a simple single-pass raycast shader.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |