mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
implement fog correctly
also some base work for edgemarking
This commit is contained in:
@ -111,12 +111,9 @@ vec4 CalculateFog(float depth)
|
||||
densityfrac = int(udepth & uint(0x1FFFF));
|
||||
}
|
||||
|
||||
float density =
|
||||
((uFogDensity[densityid] * float(0x20000-densityfrac)) +
|
||||
(uFogDensity[densityid+1] * float(densityfrac))) / float(0x20000);
|
||||
float density = mix(uFogDensity[densityid], uFogDensity[densityid+1], float(densityfrac)/131072.0);
|
||||
|
||||
return vec4(uFogColor.bgr,density);
|
||||
return uFogColor * density;
|
||||
return vec4(density, density, density, density);
|
||||
}
|
||||
|
||||
void main()
|
||||
|
Reference in New Issue
Block a user