Tag Info

New answers tagged


Thank you a lot, the solution with tex2Dgrad work perfectly ! I don't have tested the solution with texldb, because there use registers and I want to avoid that.


Shader Model 2.0 has no such function, but "tex2Dgrad" can be used to the same effect if your shader has access to the dimensions of the texture. (Note that tex2Dgrad availability is subject to the caps bit D3DD3DPSHADERCAPS2_0_GRADIENTINSTRUCTIONS, so this isn't a sure thing) Instead of: color = tex2Dlod(map, uv, lod); Do: float scale = ...


Look at the pixel shader instructions in Shader Model 2. I found "texldb" : Biased texture load instruction. This instruction uses the fourth element (.a or .w) to bias the texture-sampling level-of-detail just before sampling Syntax texldb dst, src0, src1 https://msdn.microsoft.com/en-us/library/windows/desktop/bb206217(v=vs.85).aspx

Top 50 recent answers are included