- Home /
Fixed pipeline normal mapping on iPhone
Is it posible to write fixed pipeline "reflective shader with normal map"? If so, how?
Answer by Aras · Jan 03, 2011 at 03:15 PM
You want a cubemap reflection perturbed by a normal map, per pixel? No, that's not really possible with fixed function.
And yeah, there's no performance difference between programmable & fixed function shaders, if you do the shaders right. The programmable GPUs these days do not have any fixed function stuff, so they just generate shaders behind the scenes. In Unity's OpenGL ES 2.0 implementation we do generate the shaders ourselves, since GLES2.0 does not have fixed function stuff at all.
Answer by skovacs1 · Dec 15, 2010 at 04:23 PM
For the programmable pipeline, check out the 4-th last shader (Example/WorldRefl Normalmap) here.
This should compile out to multiple passes in the compiled shader and I believe that would include the passes for fixed-function cards if applicable, no?
You might be right, although I'm not certain. $$anonymous$$y suspicion is that these shaders will do much more than I want: like include lights and so on. I just want to have base texture with environment reflection in some areas.
It's fairly easy to write an unlit programmable shader that does what you ask. Could you elaborate on why it must be "fixed pipeline", if you don't $$anonymous$$d my asking?
it must be wrong belief that fixed pipeline is faster :)
I cannot say that it is not faster at all, but there are reasons that there is a programmable pipeline and that shaders can run code - a fixed-function pipeline is very restrictive and harder to read and write. In general, while they may be marginally more performant, restricting yourself to fixed-functions is generally going to make your life much harder. Unfortunately for your question, that is beyond where I and most users here in UnityAnswers are willing to fight with it. If you want an unlit normal-mapped reflective programmable shader, I can help with that however.
Your answer
Follow this Question
Related Questions
Mobile Bumped Diffuse problem 1 Answer
How Add NormalMap 0 Answers
Compiling HDRP/Lit shader takes 41 minutes, how can I reduce this? 1 Answer
Question about Unity's Shader Graphs and Low End Pipeline 0 Answers
Leaf displacement shader that works for LWRP doesn't work with HDRP and gives odd results. 0 Answers