Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Strumpy Shader Editor [Now Open Source]

Discussion in 'Works In Progress - Archive' started by Tim-C, Aug 2, 2010.

  1. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    Hey Shenrik. In order to support both forward and deferred in a single material editor we don't expose the light direction. The node you are using is the rgba light color.

    You normally do not need to modify the lighting graph. What are you trying to accomplish?
     
  2. shenrik

    shenrik

    Joined:
    Aug 22, 2011
    Posts:
    6
    thanks for the quick reply stramit :p

    I wanted to do the half lambert tf2 style (NdotL)*0.5 - 0.5

    But if it can't be done inside the editor I can always try to code it afterwards, I love testing stuff with this editor since it takes less time than writing code by hand xD

    Overall I'm trying to have for our game something similar as what ben cloward showed at his presentation at this year gdc:

    http://www.gdcvault.com/play/1014362/Cinematic-Character-Lighting-in-STAR (I think you have to register to see the pdf)

    He's done a ramp * half lambert, then he multiplies the rim mask with the spec texture and the ramp color whiwh gives a nice two colors rimlight, which fakes very good a three light rig.

    So far I can do in code the halfLambert and the rim mask, I'm having big trouble on how to mix them toghether!

    He also talks about clamping the light angle and finally about a sky specular computation:

    • Reflect the view vector about the normal.
    • Compute dot product with world up vector.
    • Renormalize dot product result from 0 to 1.
    • Raise to a reduced specular power.
    • We use (minSpecPower + specPower / 4).

    But I haven't had time to test that :(

    I'm going to continue searching, if I find something I keep you guys posted :)

    Thanks!
     
  3. solid

    solid

    Joined:
    Jan 15, 2010
    Posts:
    132
    I did try again and you are right, Add works that way, it just looked different from the result i use to see in udk. I got some funky results when Adding in Specmap. could be the bit depth limit or something. Anyway it works, thanks for the reply =)
     
  4. avittone

    avittone

    Joined:
    Aug 22, 2011
    Posts:
    3
    Thank you. That was exactly what I needed.
     
  5. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Can I just say that I would really, really appreciate a half-lambert node? (Or half-lambert versions of the relevant default nodes?) Half-Lambert has been around since Half-Life 1 (I think) but became a big deal when Half-Life 2 came out. It is extremely useful for making bump-maps look good even when you're looking at the shadowy side of a character. It sort of "wraps" light around a bumpmapped object, so that bumps on the dark side have a little bit of light on the side facing the light source. It's hard to put into words, but if you look at a character with traditional normal-mapping and one done with half-fresnel side by side, you can see how much better they look. And that's just with a single light source and none of the fake rim-mapping tricks shenrik is talking about.

    It just looks better.

    Less accurate, but better.
     
  6. phixell.p

    phixell.p

    Joined:
    Jan 14, 2011
    Posts:
    13
    I have been attempting to write some shaders to mix textures and bumps with vertex alpha and tint the textures with vertex color. I was stumped and asked for help on the forums but got no reply. Then I downloaded this tool and voila in hours I had several variations on the what I wanted. I was able to tweak and iterate in real time and experiment my way to success. Thank you so much.

    I have a request. It may be too difficult but I will throw it out there. Could you implement the ability to import a .shader file and have Strumpy create the node tree. This would allow quick modification of the built in shaders and help us learn efficient node tree structure.

    In any case, thank you so much.

    Peter Whiteside
     
  7. shenrik

    shenrik

    Joined:
    Aug 22, 2011
    Posts:
    6

    Well yes since we want our game to run on how many configurations it can, we are stuck with forward rendering and that means only one key light, so a ramp half lambert shading does a good trick for faking a three point light rig



    It really would be could if you could access the lightdir inside strumpy, maybe have like a new graph in order to access that.

    If not, I have an idea: I also remarked that it exports only blinnphong shaders, would it be possible then to have like multiple types of harcoded shaders, that you could choose inside the editor for the wished kind of effects? I mean for example to choose inside the settings something like "shader type" and have a rolling menu with some other kind of shaders (cook-torrence, lambert, half lambert, blinn-phong, oren-nayar)

    I really don't know if that's possible, since I just started messing with the shaders and I'm not really familiar with the whole concept yet :(

    Thanks!
     
  8. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Importing (decompiling?) Unity Team's shaders sounds really cool in theory, but would it even work that way?

    Any ETA on that parallax example, by the way? My project really needs a Parallax plus Parallax Detail shader. :p I can do a Bump Plus Bump Detail, but parallax mystifies me...
     
    Last edited: Aug 26, 2011
  9. liveEXE

    liveEXE

    Joined:
    Aug 26, 2011
    Posts:
    30
    Is there some node for Light Direction I can use? Or something like this.
    I'm trying to make planet atmosphere based on additive sphere with colored gradient ramp.
     
  10. phixell.p

    phixell.p

    Joined:
    Jan 14, 2011
    Posts:
    13
    I just did a shader in Strumpy that used the fresnel to apply a reflection cube to the edges of the model. It occurs to me that you could create a color cube that would emulate lighting. Just a thought....

    I have the shader code if anyone is interested. It allows you to blend the refection in with a slider and to blend between edges and camera facing reflection.
     
  11. phixell.p

    phixell.p

    Joined:
    Jan 14, 2011
    Posts:
    13
    Oh by the way the code mentioned above:

    *In settings change blend mode to custom.
    *Set src blend to srcAlpha
    *Set des blend to oneMinusSrcAlpha
    *Set queue and render type to transparent
    *Ensure you have a value going into alpha

    Works great. It allowed me to make a transparent reflective specular bump shader.
     
  12. solid

    solid

    Joined:
    Jan 15, 2010
    Posts:
    132
    I've created a shader that takes too many interpolators to be a SM2, and to be able to use it at all i had to use deferred rendering and exclude Forward Path. Otherwise the whole scene got the pink shader with TEXCOORD error.
    So now my viewport renders the shader as black and it only works in MainCam with deferred. Is there any workarounds for that? Or have i missed something stupid simple? Like proper Fallback?
    Would be neat to be able to see at least a texture in editor viewport aswell.
     
    Last edited: Aug 26, 2011
  13. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    There are a few solutions for the too many interpolators issue. Using the "uv" parameter from a sampler uses up an interpolator, if your reading from allot of textures you can keep the SM2 compatibility by using the raw mesh UV's instead.

    Unity's deferred renderer (as I recall) does require SM3 anyways, for the deferred merging, so your not gaining anything there by skipping out on it. Additionally, if you change your player settings from forward to deferred, the scene view will use the deferred renderer aswell, making your scene views look correct again.

    Personally? Your probably best off just switching to target 3.0 in settings, though you may have some luck using a fallback.
     
  14. solid

    solid

    Joined:
    Jan 15, 2010
    Posts:
    132
    Thanks Texel. You saved my day.

    A little embarrassing that iv'e totally missed the playersettings deferred rendering option. Now it works properly. I also thought unity dynamicly changed to 3.0.. I looked in some earlier post about UV taking up one interpolator. But i was still above limit with multiple maps combined with cubemap unfortunately. But i'll keep on tuning it.

    thanks again.
     
  15. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    Solid, don't forget that some computers (non SM 3 cards) cannot do deferred rendering. So it pays to maintain SM2 compatibility if you're developing for PC/Mac. Personally I plan to wrap every Quality setting I can, including the Deferred/Forward/Vertex lighting options, into a pause menu so if the end-user wants to prioritize one type of effect over another or run it with simpler graphics than the theoretical max their computer could handle, they can do that.

    phixell.p, yes, for the love of god, share your shadergraphs! Upload them to the Unity wiki. http://www.unifycommunity.com/wiki/index.php?title=Strumpy_Shader_Editor . Post everything you've got. Even if it's just an implementation of the builtin shaders-- people can learn a lot from those!

    I'm going to be uploading mine once I get a handle on this, and I challenge everyone reading this thread to release more shadergraphs than me over the next few weeks! Let's show 'em how the Unity Community rolls!
     
  16. chadchat

    chadchat

    Joined:
    Apr 5, 2008
    Posts:
    154
    I'd like to see it~ Can you post the graph or pm me or...how do we do it here?
     
  17. JAMiller

    JAMiller

    Joined:
    Apr 2, 2009
    Posts:
    78
    Sorry to add to this overcrowded thread with my seemingly stupid problem here, but I cannot seem to get any transparent effects working with Strumpy Shader Editor...

    I tried the exact steps above and I get nothing. For example if I plug a zero constant into alpha shouldn't I get an invisible shader?

    I also don't see any transparency on the included DepthBiasAlpha example, no matter how I adjust the _Bias value. I have this problem both in Strumpy's preview and after exporting and applying the shader in Unity. Am I missing something? Are there any other transparent graphs I could test with?
     
  18. bb0x

    bb0x

    Joined:
    May 16, 2011
    Posts:
    70
    Hey guys,

    Small question.
    I'm using vertex manipulation to simulate water. The water has some nice waving effect(see attachment). The only problem i have with vertex shader is that it doesn't average the normals direction.

    Example; I have a 10x10 plane with the shader on it. Its all wavy and stuff but the normals simply point up as in the base geo. (x=0 y=1 z=0).
    Is there a way to make the shader normalize the vertex normals?
     

    Attached Files:

  19. noradninja

    noradninja

    Joined:
    Nov 12, 2007
    Posts:
    420
    I would be interested in this, have been wanting to experiment with cube-mapped lighting for characters.
     
  20. bb0x

    bb0x

    Joined:
    May 16, 2011
    Posts:
    70

    The way he described it is basically putting a cubemap into the emmisive slot controlled by a fresnel.

    Check attachment.

    It would probably be best to use low res cubemaps or blurry ones. You dont want your "lighting" too look like a reflection.



    That being said.. I worked a bit more on my water shader. I decided not to worry about the vertex normals as it isnt an obvious issue.

    Now the only thing left for me to do is add Alpha fading when intersecting with other objects.. How exactly do I go about doing this?

    Thanks in advance
     

    Attached Files:

  21. Nose

    Nose

    Joined:
    Jun 21, 2011
    Posts:
    36
    Please help to make transparent shader refract
     
    Last edited: Aug 28, 2011
  22. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    Awesome idea! I never really thought of it like that, I'll see what I can come up with ;)
     
  23. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    For this you need light direction... I'll see what I can do with 'custom' lighting it will not work in deferred though.
     
  24. liveEXE

    liveEXE

    Joined:
    Aug 26, 2011
    Posts:
    30
    Hi. There is still no Rotate UV node :confused:
     
  25. phixell.p

    phixell.p

    Joined:
    Jan 14, 2011
    Posts:
    13
    Here is the shader code:

    Shader "LerpCubeTexture"
    {
    Properties
    {
    _AlphaTexture("_AlphaTexture", 2D) = "black" {}
    _ReflectionCube("_ReflectionCube", Cube) = "black" {}
    _ReflectionBlend("_ReflectionBlend", Range(0,1) ) = 1
    _Texture1("_Texture1", 2D) = "gray" {}
    _color1("_color1", Color) = (1,1,1,1)
    _FaceRatio("_FaceRatio", Range(0,1) ) = 0

    }

    SubShader
    {
    Tags
    {
    "Queue"="Transparent"
    "IgnoreProjector"="False"
    "RenderType"="Transparent"

    }


    Cull Back
    ZWrite On
    ZTest LEqual
    ColorMask RGBA
    Fog{
    }


    CGPROGRAM
    #pragma surface surf BlinnPhongEditor vertex:vert
    #pragma target 2.0


    sampler2D _AlphaTexture;
    samplerCUBE _ReflectionCube;
    float _ReflectionBlend;
    sampler2D _Texture1;
    float4 _color1;
    float _FaceRatio;

    struct EditorSurfaceOutput {
    half3 Albedo;
    half3 Normal;
    half3 Emission;
    half3 Gloss;
    half Specular;
    half Alpha;
    half4 Custom;
    };

    inline half4 LightingBlinnPhongEditor_PrePass (EditorSurfaceOutput s, half4 light)
    {
    half3 spec = light.a * s.Gloss;
    half4 c;
    c.rgb = (s.Albedo * light.rgb + light.rgb * spec);
    c.a = s.Alpha;
    return c;

    }

    inline half4 LightingBlinnPhongEditor (EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
    {
    half3 h = normalize (lightDir + viewDir);

    half diff = max (0, dot ( lightDir, s.Normal ));

    float nh = max (0, dot (s.Normal, h));
    float spec = pow (nh, s.Specular*128.0);

    half4 res;
    res.rgb = _LightColor0.rgb * diff;
    res.w = spec * Luminance (_LightColor0.rgb);
    res *= atten * 2.0;

    return LightingBlinnPhongEditor_PrePass( s, res );
    }

    struct Input {
    float2 uv_Texture1;
    float3 sWorldNormal;
    float3 viewDir;
    float2 uv_AlphaTexture;

    };

    void vert (inout appdata_full v, out Input o) {
    float4 VertexOutputMaster0_0_NoInput = float4(0,0,0,0);
    float4 VertexOutputMaster0_1_NoInput = float4(0,0,0,0);
    float4 VertexOutputMaster0_2_NoInput = float4(0,0,0,0);
    float4 VertexOutputMaster0_3_NoInput = float4(0,0,0,0);

    o.sWorldNormal = mul((float3x3)_Object2World, SCALED_NORMAL);

    }


    void surf (Input IN, inout EditorSurfaceOutput o) {
    o.Normal = float3(0.0,0.0,1.0);
    o.Alpha = 1.0;
    o.Albedo = 0.0;
    o.Emission = 0.0;
    o.Gloss = 0.0;
    o.Specular = 0.0;
    o.Custom = 0.0;

    float4 Tex2D0=tex2D(_Texture1,(IN.uv_Texture1.xyxy).xy);
    float4 TexCUBE0=texCUBE(_ReflectionCube,float4( IN.sWorldNormal.x, IN.sWorldNormal.y,IN.sWorldNormal.z,1.0 ));
    float4 Fresnel0_1_NoInput = float4(0,0,1,1);
    float4 Fresnel0=(1.0 - dot( normalize( float4( IN.viewDir.x, IN.viewDir.y,IN.viewDir.z,1.0 ).xyz), normalize( Fresnel0_1_NoInput.xyz ) )).xxxx;
    float4 Invert0= float4(1.0, 1.0, 1.0, 1.0) - Fresnel0;
    float4 Lerp2=lerp(Invert0,Fresnel0,_FaceRatio.xxxx);
    float4 Lerp0=lerp(TexCUBE0,float4( 0.0, 0.0, 0.0, 0.0 ),Lerp2);
    float4 Lerp1=lerp(float4( 0.0, 0.0, 0.0, 0.0 ),Lerp0,_ReflectionBlend.xxxx);
    float4 Tex2D1=tex2D(_AlphaTexture,(IN.uv_AlphaTexture.xyxy).xy);
    float4 Master0_1_NoInput = float4(0,0,1,1);
    float4 Master0_7_NoInput = float4(0,0,0,0);
    float4 Master0_6_NoInput = float4(1,1,1,1);
    o.Albedo = Tex2D0;
    o.Emission = Lerp1;
    o.Specular = _color1;
    o.Gloss = _color1;
    o.Alpha = Tex2D1;

    o.Normal = normalize(o.Normal);
    }
    ENDCG
    }
    Fallback "Specular"
    }
     
  26. bb0x

    bb0x

    Joined:
    May 16, 2011
    Posts:
    70
    My previous question still stands.
    How do I alpha fade when my water plane interects with another model?

    Also is there a way to make the alpha/transparency not affect the specularity?
    I'd like my specular to stay white even if the alpha is zero. I could do this very easily if I could simply take the final specular effect of my shader and use that to mask my alpha.
     
  27. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Intersection is hard. As for as i know, the usual way is grabbing the depth map and having a look into it, if there are models inside, at what depth etc. Not really sure about it though. If you know the shader stuff, you could look into the water4 shader. It's done somwhere there for caustics.
     
  28. bb0x

    bb0x

    Joined:
    May 16, 2011
    Posts:
    70
    Thanks Chickenlord for replying. I'm guessing getting Zdepth is a pro only feature?
    I dont have unity Pro atm so I should forget about that for now. It would be nice to know how to do it even if I don't have unity Pro right now, I'm pretty sure ill get it in the future.

    Apart from that.. is this a bug or is it just me doing something wrong?
    If got 2 texture that are panning. they use the same Time node and the UV pan settings are exactly the same (input channel: X, Pan x and y) Yet one of them is going a bit faster..
     
  29. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    When you have unity pro take a look at the 'DepthBiasedAlpha' example. It shows how to change what is rendered based on what is rendered behind it.

    As for the UVPan it should be the same. Are you sure that one of the textures in the material is not scaled at all or tiled?
     
  30. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    I don't think I've done a release since I posted that... there will be in the next release.
     
  31. bb0x

    bb0x

    Joined:
    May 16, 2011
    Posts:
    70
    Thanks Stramit.

    Weird.. Trying to reproduce it but I cant.. Maybe I was just staring at my screen to long.

    Oh and rotation will be handy. Is there a workaround for this before the next release?

    Btw, vertex reflections seem to be flipped. It works fine when inverting them though.
     
  32. Paradoks

    Paradoks

    Joined:
    Oct 13, 2009
    Posts:
    436
    Hi,

    I am totaly new to shaders, and i need an outline shader for an iPhone project, so my question is:
    Can SSE make iOS specifics shaders ?

    thx

    [Edit] i dont have the preview window - how can i get it ?
     
    Last edited: Aug 30, 2011
  33. Chickenlord

    Chickenlord

    Joined:
    May 13, 2011
    Posts:
    381
    Hey paradoks. Strumpys can create GLES 2.0 compatible shaders, which would work on newer ios devices. Older devices (pre 3gs i guess) only support GLES 1.1 (which would be fixed function shaderlab stuff), so the shader created with strumpys wouldn't work on it. Another thing is, that most shaders run rather slow on ios devices, so usually you'd need to create highly optimized shader. And strumpys shader editor doesn't export highly optimized shaders (though this doesn't really matter on desktop systems).
     
  34. noradninja

    noradninja

    Joined:
    Nov 12, 2007
    Posts:
    420
    An outline shader that works on iOS is pretty easy, use a fresnel and clamp the ramp to get a hard edge. Chickenlord is right, they can be expensive (especially on the 3GS) but you can make them cheaper a lot of the time by enabling 'Approximate View' and 'Half as View' in the settings tab in SSE before you export the window. From what I can tell this lowers the precision of some calculations making them faster but less accurate. Also, FWIW, if you are targeting the iPad 2, the GPU in that sucker is miles ahead of the iPhone4/iPad1/iPT4G, I actually only enabled the above to get a good framerate on pre-A5 devices.

    Also, the preview window only works in Unity Pro, unfortunately, because it uses RTT to display. Personally, I think it should display a real time object with the shader compiled in the BG and applied, but I am not sure if thats possible.
     
  35. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    Another important note, on the lowend iOS devices, you should try to ignore the normalize, pow, log, and other nonscalar math nodes. Pow in particular ends up being enough to cripple performance on the lower devices- For this reason, you should handle any exponents on a per-vertex level (Packing it into vertex color, for instance) and avoid using Gloss and Specular. (Cubemaps, however, work pretty well)
     
  36. Nose

    Nose

    Joined:
    Jun 21, 2011
    Posts:
    36
    Help make refract shader
     
    Last edited: Aug 30, 2011
  37. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    This could be a total noob question. But how do you access the properties for .x .y .z in the visual editor? I want to explicitly check for a vector's properties and use it in a function. Did I miss something?
     
  38. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    Either the Splat, Split, or Swizzle nodes let you access components directly- That said, internally everything will always still be represented as a full float4, partially for convenience aswell as to model the actual registers and instructions that it will compile down to, so you really would be doing something closer to ".xxxx" or ".yyyy"
     
  39. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Any chance you would add vector properties for just .x, .y, .z. That way it could compile down to:

    // example syntax
    if (vertex.x < 2)
    {
    vertex.y = vertex.x + vertex.z;
    vertex.x = 0;
    }
    jitter = vertex.y;
    vertex.x = vertex.x + jitter;

    // how do you get floats back to a float 4?
    newvector.x = vertex.x;
    newvector.y = vertex.y;
    newvector.z= vertex.z;
    newvector.w = vertex.w;

    Ahhh assemble is the opposite of split.
     
    Last edited: Aug 31, 2011
  40. Texel

    Texel

    Joined:
    Dec 25, 2009
    Posts:
    61
    The CG-Compiler actually handles that simplification, similarly the glsl pre-optimizer will catch the unneeded registers and combine them. So while it certainly looks messy with everything being four components, the assembly ends up being the same, it only becomes a potential issue when trying to do lowend mobile optimization.
    As for combining, Assemble, Swizzle, Mask, and Add are probably your key friends there. Be sure to check the tooltip documentation in the nodes window, Assemble has the potential to be fairly slow if used inappropriately.
     
  41. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Actually now that I played around with it, I got it down. It works like a charm.
     
  42. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Another noob question. How do you get strumpy to use the alpha channel of the RGBA texture? I'm able to use Unity's built-in nature leaves shader which does a cut out. How would I setup the nodes to use the alpha channel?


    Even a transparent diffuse effect. I don't see it using the alpha channel at all....
     
    Last edited: Aug 31, 2011
  43. Julinoleum

    Julinoleum

    Joined:
    Aug 31, 2011
    Posts:
    40
    I also need that UV rotation feature. When can we expect the next release? Last time someone asked for UV rotate, it was april :S
     
  44. Skinhinge

    Skinhinge

    Joined:
    Aug 1, 2011
    Posts:
    6
    I as well am getting absolutely no results trying to get transparency to work with the shaders I am building. I have tried every Render Type in the list ( I would expect Transparent or Transparent Cutout to work for my purposes. I have tried SHader model 2 and 3. All it does is darken the area that is supposed to be masked rather than making it transparent.

    Any help?

     
  45. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    I eventually found the blend settings. I'm not exactly sure what options to use to achieve the same as the nature shader. But I did get the alpha to start working.

     
    Last edited: Sep 1, 2011
  46. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    Have you set up the blend settings?

    *In settings change blend mode to custom.
    *Set src blend to srcAlpha
    *Set des blend to oneMinusSrcAlpha
    *Set queue and render type to transparent
    *Ensure you have a value going into alpha
     
  47. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,183
    I'm actually rewriting the whole of the core and node system at the moment to be faster and work much nicer so it will be about a week or so after that. Should be at about unite time!
     
  48. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    Almost. The alpha of the cutout is replacing the depth buffer. You can see the outline of the leaves are showing through to the background on other mesh items.


    Here is my graph and the outputted shader that I'm trying to achieve. How can the graph achieve multiple passes?
     

    Attached Files:

    Last edited: Sep 1, 2011
  49. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,436
    Hey stramit, I have a question for you... I am now looking to use the Vertex graph on my water shader, and I would like it to actually move the normals like it is wavy... what is a quick way to go about that :)
     
  50. tgraupmann

    tgraupmann

    Joined:
    Sep 14, 2007
    Posts:
    828
    You could use the graph that I just posted except instead of offsetting the vertex positions you offset the normals.