Screen scale in SparkSL

I am not able to get correct texel size.
This does not seem to account for screen scale.

  vec2 size = std::getRenderTargetSize();
  texelSize = 1.0 / size;

  // vec2 scale = std::getVideoTextureScale();  // does NOT change with device
1 Like

Can you illustrate what is incorrect about this? I think screen scale is always a uniform number and generally I’ve only seen it used in conjunction with canvas coordinates, not shaders.

1 Like

It looks like it accounted for scale already. But still, getVideoTextureScale does not make sense to me.

Could it be the aspect ratio of the video texture itself? You would need to know that in order to scale it appropriately since it’s not necessarily a square texture. I’ve got a demo of this behavior in this thread (not SL though)

1 Like