Work In Progress - Snow shader

Hi everyone,

Let me present to you what I am currently working on: Snow shader.
It is composed of those properties:

  • Diffuse Color
  • Diffuse Map
  • Specular Color
  • Specular Map
  • Specular Power
  • Shininess
  • Normal Map
  • Light Interpolation Map
  • Light Interpolation Power
  • Shadow Color

Here are some tests I made. I will post more screen.




I think that the result is quite good, and there is no need to add any other property, unless you have any idea.
For the moment I am trying to make it clean, optimized and multiplateform and add some other cool stuff like multilight support.
Next, I plane to make an ice shader.

If you have any idea on how I can improve this shader just tell me, any idea, advice or comment is welcome.
Thanks a lot ! :wink:

MaT.

you can add customize fog to affect the color of snow

You can easily affect the color of the snow with the Diffuse Color or the Light Interpolation Map.

without change alone viewDir or height?

I see you’ve got sparkles added, some of which are even tinted in the various colors of the spectrum, as is the case with real snow. One problem, however: the actual sparkles are usually somewhat star-shaped or diamond shaped and are larger than the single points you have. This is difficult to do in a shader, but would be crucial for creating the dazzling sparkling effect that actual snow has in direct sunlight.

Sparkles don’t really have size or a shape on their own: that’s generally up to a bloom and flares postprocess. All the sparkles have to do is be bright enough to flare visibly.

Well, sure; but I was referring to the apparent shape they have as a visual effect. If you can’t use postprocessing effects (UnityPro only) you’d have to find some method of using the shader to create the right effect. I’ve been trying to figure out how to do that for both water and snow sparkles, since I don’t have UnityPro yet.

Concerning the sparkles, I didn’t find a way to make them more realistic based on the look direction or light direction. For the moment it’s a simple scaled noise map linked with the specular, but the result is quite correct.

try Break it, rebuild it from head:smile: