Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect precision when reading from texture #42

Open
GregSlazinski opened this issue Jul 15, 2019 · 0 comments
Open

Incorrect precision when reading from texture #42

GregSlazinski opened this issue Jul 15, 2019 · 0 comments

Comments

@GregSlazinski
Copy link

I use this code to specify high precision for "Depth" sampler:

      HLSLccSamplerPrecisionInfo sampler_precision;
      sampler_precision.insert(std::pair<std::string, REFLECT_RESOURCE_PRECISION>("Depth" , REFLECT_RESOURCE_PRECISION_HIGHP));

and in HLSL I read from that sampler, store results in float4 (high prec)
float4 value=read from Depth..

However the generated GLSL code gives me:

layout(location = 3) uniform highp sampler2D Depth; // THIS OK
mediump vec4 u_xlat10_0; // THIS NOT OK
void main()
{
    u_xlat10_0 = textureLod(Depth, vs_TEXCOORD0.xy, 0.0);

the u_xlat10_0 is defined as mediump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant