- Home /
Alpha blending + HDR problem
Hi, I have a particle system in my scene with a particles->alpha blended shader. If camera has hdr OFF, the render is just fine, if it's ON, the colors of the particles are all wrong. Here is a screen from the scene (rendered right) : 
And here is a screen from the game camera (with HDR, messed up colors) : 
I'd rather have the HDR option and render alpha blended particles correctly. Is this possible ?
Answer by punk · Jan 21, 2015 at 04:57 AM
I just had this problem also, I fixed it by editing the shader and after this line
fixed4 col = 2.0f i.color _TintColor * tex2D(_MainTex, i.texcoord);
I added col = clamp(col, 0 ,1);
something to do with the col values wrapping into negatives
Taz
That fixed the problem. In the Alpha blended shader, the line :
return 2.0f i.color TintColor * tex2D($$anonymous$$ainTex, i.texcoord);
Became :
fixed4 col = 2.0f i.color TintColor * tex2D($$anonymous$$ainTex, i.texcoord);
col = clamp(col, 0, 1);
return col;
Thanks Taz.
Your answer
Follow this Question
Related Questions
How do I use Movie Texture with alpha channel? 4 Answers
Acces the secondary colors in the shaders. 1 Answer
Stenciling on Unity iPhone 1 Answer
Non rectangular GUI Mask / Matte? 2 Answers
Gui alpha change 0 Answers