Sea Simulation based on "Seascape" by Alexander Alekseev
Tags
sea
Comments
I literally have no idea how this works (making it go full screen) - something I thought was impossible with ShaderFrog - but I love it! Also I get black artifacts in the sky, are you missing a declaration somewhere?
Making it go full screen is rather simple, in the vertex shader instead of transforming the plane with the modelMatrix, I am just directly sending the position. By doing that the entire plane is being incorrectly rendered and filling the viewport (which is what I want). As for the black artifacts, that is most likely due to the fact that the calculations are dependent on the viewports resolution, which is not passed into the shader, so I have a pseudo resolution that is making the calculations odd, but working. Well, that and probably I mathed wrong somewhere :P
For example look at your Star Field shader: http://shaderfrog.com/app/view/25 Simply switch the shape to plane and then change gl_Position to vec4(position, 1.0); The only issue is stretching caused by how the plane is being mapped and cant be fixed unless you know the resolution.
After giving this some more thought, I might make a separate "full screen" shader type, or something similar, which would have no vertex shader, pass things like resolution, and not be eligible to be composed. These types of shaders are more removed from the default ShaderFrog use case, and they can't be composed together in the same way other shaders can. The core of shaderfrog is composing small components together, while these are more like full standalone scenes that aren't very portable.
Learning the basics here. Why this one does not look like shadertoys? Does this one need some extra fx or some kind of water material? Btw, this site is great!
I literally have no idea how this works (making it go full screen) - something I thought was impossible with ShaderFrog - but I love it! Also I get black artifacts in the sky, are you missing a declaration somewhere?
Making it go full screen is rather simple, in the vertex shader instead of transforming the plane with the modelMatrix, I am just directly sending the position. By doing that the entire plane is being incorrectly rendered and filling the viewport (which is what I want). As for the black artifacts, that is most likely due to the fact that the calculations are dependent on the viewports resolution, which is not passed into the shader, so I have a pseudo resolution that is making the calculations odd, but working. Well, that and probably I mathed wrong somewhere :P
For example look at your Star Field shader: http://shaderfrog.com/app/view/25 Simply switch the shape to plane and then change gl_Position to vec4(position, 1.0); The only issue is stretching caused by how the plane is being mapped and cant be fixed unless you know the resolution.
Hmm. I'll look into adding the resolution to the uniforms list. Should be pretty straightforward.
That would be awesome, little things like that would really improve this program. Great job on it btw!
After giving this some more thought, I might make a separate "full screen" shader type, or something similar, which would have no vertex shader, pass things like resolution, and not be eligible to be composed. These types of shaders are more removed from the default ShaderFrog use case, and they can't be composed together in the same way other shaders can. The core of shaderfrog is composing small components together, while these are more like full standalone scenes that aren't very portable.
Learning the basics here. Why this one does not look like shadertoys? Does this one need some extra fx or some kind of water material? Btw, this site is great!