mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
particle alpha inflkuence on glow
This commit is contained in:
parent
dd72a627a9
commit
e83849f6a0
|
|
@ -108,9 +108,10 @@ void main()
|
|||
vec3 colorScale = ( alphaFactor < 0.0 ? IN_color.rgb * diffuse.rgb : vec3( alphaFactor > 0.0 ? IN_color.a * diffuse.a * alphaFactor * softBlend : softBlend ) );
|
||||
if (glow)
|
||||
{
|
||||
vec3 glowCol = (IN_color * diffuse).rgb*10;//pow((IN_color * diffuse).rgb*10,3.54406804435);
|
||||
float alphaLim = IN_color.a * diffuse.a;
|
||||
vec3 glowCol = (IN_color * diffuse).rgb*10;
|
||||
glowCol*=glowCol*glowCol*0.54406804435;
|
||||
colorScale *= glowCol.rgb;
|
||||
colorScale *= glowCol.rgb*alphaLim;
|
||||
}
|
||||
OUT_col = hdrEncode( vec4( IN_color.rgb * diffuse.rgb * colorScale,
|
||||
IN_color.a * diffuse.a * softBlend * alphaScale ) );
|
||||
|
|
|
|||
|
|
@ -105,8 +105,9 @@ float4 main( Conn IN ) : TORQUE_TARGET0
|
|||
float3 colorScale = ( alphaFactor < 0.0 ? IN.color.rgb * diffuse.rgb : ( alphaFactor > 0.0 ? IN.color.a * diffuse.a * alphaFactor * softBlend : softBlend ) );
|
||||
if (glow)
|
||||
{
|
||||
float4 glowCol = float4(pow(max((IN.color * diffuse).rgb*10,0.0),3.54406804435),(IN.color * diffuse).a);
|
||||
colorScale *= glowCol.rgb;
|
||||
float alphaLim = IN.color.a * diffuse.a;
|
||||
float3 glowCol = pow(max((IN.color * diffuse).rgb*10,0.0),3.54406804435);
|
||||
colorScale *= glowCol*alphaLim;
|
||||
}
|
||||
return hdrEncode( float4( IN.color.rgb * diffuse.rgb * colorScale,
|
||||
IN.color.a * diffuse.a * softBlend * alphaScale ) );
|
||||
|
|
|
|||
Loading…
Reference in a new issue