carl.sutton Posted November 4, 2011 Posted November 4, 2011 Hello. Is there a base material that can handle an opacity level (i.e a 0 - 1 value that can represent semi-transparancy). I've been playing with the material library sample and have failed to find a parameter that can handle this. Does one exist or is there a standard approach for achiving this with unigines current material set?
ulf.schroeter Posted November 4, 2011 Posted November 4, 2011 Just enable blending on material (see documentation on different source/dest blend mode combination effects)
carl.sutton Posted November 4, 2011 Author Posted November 4, 2011 Hi Ulf. Wouldn't that require storing the transparency data within the texture, such as in the alpha channel? This isn't really what I want as I want to be able to dynamically change the transparncy level without having to rewrite the texture each time. Perhaps I'm just missing something but I thought opacity level would be a rather common shader parameter, or perhaps just a little easier to use. In short, do I need to write my own shader code for this or not?
ulf.schroeter Posted November 4, 2011 Posted November 4, 2011 You should be able to achive this via material color scale parameter by activating material transparency and dynamically setting color scale values with variing alpha scale values e.g. vec4(1,1,1,0) <-> vec4(1,1,1,1). This should produce your effect even for simple RGB textures without alpha channels
carl.sutton Posted November 4, 2011 Author Posted November 4, 2011 Thanks Ulf. Thats exactly what I was looking for.
Recommended Posts