"* float(0xFFFFFF)"?


On Fri, Feb 14, 2014 at 6:08 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");
>
> 16777215 = 0xFFFFFF
>
> Depth is supposed to be 24 bit int. Do you think a define for this would
> be appropriate? Can't really think of a good name :(
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/dolphin-emu/dolphin/pull/68/files#r9755583>
> .
>



-- 
Pierre "delroth" Bourdon <delroth@gmail.com>
Software Engineer @ Zürich, Switzerland
http://code.delroth.net/