Its all in one pass. Its a deformed doughnut (torus). I deform the vertices, but not the normals. The bright phong is just k*pow( dot(normal,eye_vector), exponent), and I set the alpha the same way, but with a different K and exponent so that it fades as the normals begin to turn away from the eye. Depth buffer is off, so is culling so it draws both sides, giving it some more depth.
Again, much better, still need to move the lighting from the vertex shader to the pixel shader, or use a model with a higher polly count for the ring mesh..
Yeah, the lighting is already in the pixel shader. I need a higher poly model or, better perhaps, a way to recompute the normal when I stretch the vertex. Since the vertex shader only gives me one vertex at a time, I don't know how I can refigure the normal. I know the original normal, and the distance and direction I'm stretching the vertex, but how that will affect the original slope is beyond me.
Are you altering the verts on the CPU or the GPU. I would recommend on the GPU. Take a look at NVIDIA's ocean shader, it's done in the GPU there, see how they did it and maintained the Normal. Not looked my self, if I get time I will.
beautiful
lavacolor 1 year ago
a pass by taking the brighter points of a deformating doughnut , turning it into an alpha, and applying it to the actual scene?
FireShockX 2 years ago
Its all in one pass. Its a deformed doughnut (torus). I deform the vertices, but not the normals. The bright phong is just k*pow( dot(normal,eye_vector), exponent), and I set the alpha the same way, but with a different K and exponent so that it fades as the normals begin to turn away from the eye. Depth buffer is off, so is culling so it draws both sides, giving it some more depth.
DrJBN 2 years ago
What's the name of this program?
Someone tell me please =]
mazi06 2 years ago
I did this with C# and HLSL (high-level shader language) through Microsoft XNA game studio.
DrJBN 2 years ago
Again, much better, still need to move the lighting from the vertex shader to the pixel shader, or use a model with a higher polly count for the ring mesh..
NemoKradXNA 3 years ago
Yeah, the lighting is already in the pixel shader. I need a higher poly model or, better perhaps, a way to recompute the normal when I stretch the vertex. Since the vertex shader only gives me one vertex at a time, I don't know how I can refigure the normal. I know the original normal, and the distance and direction I'm stretching the vertex, but how that will affect the original slope is beyond me.
DrJBN 3 years ago
Are you altering the verts on the CPU or the GPU. I would recommend on the GPU. Take a look at NVIDIA's ocean shader, it's done in the GPU there, see how they did it and maintained the Normal. Not looked my self, if I get time I will.
NemoKradXNA 3 years ago