(1 << 24) - 1 is also a common way to express these kind of masks.


On Fri, Feb 14, 2014 at 6:15 PM, Tony Wasserka <notifications@github.com>wrote:

> In Source/Core/VideoCommon/PixelShaderGen.cpp:
>
> > @@ -546,12 +500,12 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
> >  	// The performance impact of this additional calculation doesn't matter, but it prevents
> >  	// the host GPU driver from performing any early depth test optimizations.
> >  	if (g_ActiveConfig.bFastDepthCalc)
> > -		out.Write("float zCoord = rawpos.z;\n");
> > +		out.Write("int zCoord = int(rawpos.z * 16777215.0);\n");
>
> I'm not sure if it would break the shader compiler also in this case. The
> point here really is just that 16777215 is the maximum value which a 24 bit
> integer can hold. So maybe something like MAX_UINT24 would be appropriate.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/dolphin-emu/dolphin/pull/68/files#r9755865>
> .
>



-- 
Pierre "delroth" Bourdon <delroth@gmail.com>
Software Engineer @ Zürich, Switzerland
http://code.delroth.net/