On 17.06.2008 18:44, Ian Romanick wrote:
> Nicolai Hähnle wrote:
> 
>> 2. We want to rewrite TEX instructions in fragment programs *before* other 
>> transformations; however for shadow textures, the resulting code depends on 
>> the compare function of the referenced texture.
> 
> This may not be true.  How does your hardware work (I don't know which 
> driver you're working on )?  Does it use state set in the texture 
> hardware to select shadow sampling or does it use special instructions 
> for shadow sampling?  The GLSL spec says that if the sampler state is 
> ignored.  It also says that the results are "undefined" if the texture 
> state (i.e., internal format) doesn't match a shadow mode.  You can 
> probably just generate the shadow texture instructions and let the user 
> shoot themselves in the foot.

Well, the title suggests r300 :-).
IIRC there's no hardware support at all. You simply do a point-sampled
texture lookup (or you could do 4 point-sampled lookups to get PCF
later), then do the shadow comparison in the shader. So the generated
fragment shader code will indeed be different for different shadow
comparison modes...

Roland



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to