CG equivalent texelFetchOffset

What will be the CG equivalent of texelFetchOffset GLSL ?

+4
source share
1 answer

According to nVidia documentation :

tex2Dfetch - Searches for unfiltered texture in this sampler.

Use one of these overloads:

 float4 tex2Dfetch(sampler2D samp, int4 s) float4 tex2Dfetch(sampler2D samp, int4 s, int texelOff) int4 tex2Dfetch(isampler2D samp, int4 s) int4 tex2Dfetch(isampler2D samp, int4 s, int texelOff) unsigned int4 tex2Dfetch(usampler2D samp, int4 s) unsigned int4 tex2Dfetch(usampler2D samp, int4 s, int texelOff) 

Options

 samp Sampler to lookup. s Coordinates to perform the lookup. The level of detail is stored in the last component of the coordinate vector. texelOff Offset to be added to obtain the final texel. 
+2
source

Source: https://habr.com/ru/post/1440624/


All Articles