Jump to content

havenphillip

Members
  • Posts

    550
  • Joined

  • Last visited

Blog Comments posted by havenphillip

  1. On 4/21/2023 at 7:24 AM, Marcousik said:

    Would it be possible to make a shader that generates water little circle-waves around the position, where for exampl someone would have thrown a stone in water?

     

    Best I can come up with is to find a simple ripple shader on Shadertoy and then get normals from that noise and plug it into a decal shader, then just use it like you would in your tire tread decal system. I made one and tried it on the FPS gun bullet decal material. It works ok. I left the diffuse output at 0 so only the normals show up. You can adjust the speed, zoom, frequency and centering on the ripple. I found one where the ripples fade out on the edges. Also that's how the decal material is set up I don't know how much that matters to the effect:

    974020529_decalripple.thumb.jpg.c4349ff291e38ea963bfd7720da70c83.jpg

     

    decal ripple.zip


     

    • Like 5
  2. That looks great. Can we do vertex displacement in LE4?

    I found this little code segment on the internet. I get it in the editor but not in-game on the brush.

        vec4 dv = textureLod(texture3,ex_texcoords0.xy,0.0);
        float df = 0.015*dv.x + 0.024*dv.y + 0.021*dv.z;
        vec4 newVertexPos = vec4(vec3(dv.xyz* ex_normal*0.01)  * df * 100.0, 0.0) + ex_vertexposition;
        gl_Position = (projectioncameramatrix * newVertexPos);

×
×
  • Create New...