Re: Shader for lighting direction
Nope, it's a normal map, the colours are encoded surface "normal" vectors. blue=Z=outwards, which is why it's mostly blue, and interesting colours on the sloped edges.
They're very common in 3D games as a way of increasing the visible detail of a surface without using more polygons.
If you're seeing that when you run it you either aren't using HWA MMF2 or aren't installing the shader (I don't know if you need to to view the example?) or don't have a pixel-shader 2.0 capable graphics card.
Re: Shader for lighting direction
[size:17pt][color:#FF0000]FANTABULOUSLY PERFECT DYNASOFT![/color][/size]
I've acquired a plug-in for photoshop that creates normal maps and once again I can't say enough to you for your quality work!
Re: Shader for lighting direction
Quote:
Originally Posted by Dynasoft
If you're seeing that when you run it you either aren't using HWA MMF2 or aren't installing the shader (I don't know if you need to to view the example?) or don't have a pixel-shader 2.0 capable graphics card.
Yeah I'm not stupid.
But alright it seems nice, I might learn more about this later as it seems really neat.
Re: Shader for lighting direction
Now, is it possible to create a shader that *casts* a shadow in this same manner? An easy way to have objects with drop shadows for instance. Right now, I create a shadow object and always keep it under my objects, so they appear to be floating just off of the background. This is tedious sometimes, but works.
Re: Shader for lighting direction
I'm afraid not.
In general, pixel shaders that read more than a few pixels from the original image are really slow, and with PS3.0 not working in my copy of MMF2 HWA (is this a global problem?) reading more than a few pixels goes over the instruction limit anyway.
A pixel shader that generates information (like casting a shadow) is just too expensive. Though I'd love to see someone do it :)
Re: Shader for lighting direction
yeah, I'll just stick with my tried and true method for now. Thanks!
Re: Shader for lighting direction
i think looki's pack has "Shading" if thats what you looking for, no clue how resource heavy it is though
Re: Shader for lighting direction
Indeed, he added an effect called "Shade", "for drop shadows". Not sure what it actually looks like, and I can't test it now. Give it a go.
Re: Shader for lighting direction
Yeah it adds shades to objects, basically. It's really neat and I recommend it, but add it on a layer instead, or you'll have the object size limit on it.
Re: Shader for lighting direction
MechaBowser, can you explain how to add it on a layer? I'm not sure how to do that. Thanks!