Closed jmdejong closed 1 year ago
Does it work if you use uniform sampler2D tex : filter_linear;
?
It's possible that the OpenGL renderer defaults to nearest-neighbor filtering when no hint is specified, while the Vulkan rendere defaults to linear filtering.
Indeed it sounds like the OpenGL renderer isn't using the same defaults as the Vulkan renderer. It should.
Yes, using filter_linear
fixed it.
Also, it seems that using the mipmap was not included in the opengl defaults either.
Another default mismatch exists with repeat_enable
. The opengl render will default to repeat_enable
but vulcan uses repeat_disable
by default.
This was fixed yesterday in https://github.com/godotengine/godot/pull/71011 the defaults should be good now.
Godot version
v4.0.beta10.official.d0398f62f
System information
archlinux; vulkan on dedicated NVIDIA GeForce RTX 3060 Laptop GPU; opengl3 on integrated AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.49, 6.1.1-arch1-1)
Issue description
Setting the albedo in the fragment shader based on a sampled texture does not do any interpolation between the pixels of the texture with the opengl3 renderer.
Example of viewing a quadmesh with a green texture in opengl3:
Same view with the vulkan renderer: (the brightness seems to be a different problem)
used texture:
Shader:
Steps to reproduce
Minimal reproduction project
texturebrightness.zip