remove redundant vertexRounding uniform from interface shader
interface is always drawn without super-sampling anyway
This commit is contained in:
parent
c405fda45c
commit
563d95b9e6
@ -1,13 +1,7 @@
|
||||
{
|
||||
"blitFrameBuffer" : "main",
|
||||
|
||||
"effectParameters" : {
|
||||
"vertexRounding" : {
|
||||
"type" : "bool",
|
||||
"default" : false,
|
||||
"uniform" : "vertexRounding"
|
||||
}
|
||||
},
|
||||
"effectParameters" : {},
|
||||
"effectTextures" : {},
|
||||
|
||||
"effectShaders" : {
|
||||
|
@ -6,7 +6,6 @@ uniform vec2 textureSize2;
|
||||
uniform vec2 textureSize3;
|
||||
uniform vec2 screenSize;
|
||||
uniform mat3 vertexTransform;
|
||||
uniform bool vertexRounding;
|
||||
|
||||
in vec2 vertexPosition;
|
||||
in vec4 vertexColor;
|
||||
@ -21,13 +20,6 @@ void main() {
|
||||
vec2 screenPosition = (vertexTransform * vec3(vertexPosition, 1.0)).xy;
|
||||
gl_Position = vec4(screenPosition / screenSize * 2.0 - 1.0, 0.0, 1.0);
|
||||
|
||||
if (vertexRounding) {
|
||||
if (((vertexData >> 3) & 0x1) == 1)
|
||||
screenPosition.x = round(screenPosition.x);
|
||||
if (((vertexData >> 4) & 0x1) == 1)
|
||||
screenPosition.y = round(screenPosition.y);
|
||||
}
|
||||
|
||||
int vertexTextureIndex = vertexData & 0x3;
|
||||
if (vertexTextureIndex == 3)
|
||||
fragmentTextureCoordinate = vertexTextureCoordinate / textureSize3;
|
||||
|
@ -254,7 +254,7 @@ void OpenGlRenderer::loadEffectConfig(String const& name, Json const& effectConf
|
||||
|
||||
effectParameter.parameterUniform = glGetUniformLocation(m_program, p.second.getString("uniform").utf8Ptr());
|
||||
if (effectParameter.parameterUniform == -1) {
|
||||
Logger::warn("OpenGL20 effect parameter '{}' has no associated uniform, skipping", p.first);
|
||||
Logger::warn("OpenGL20 effect parameter '{}' in effect '{}' has no associated uniform, skipping", p.first, name);
|
||||
} else {
|
||||
String type = p.second.getString("type");
|
||||
if (type == "bool") {
|
||||
|
Loading…
Reference in New Issue
Block a user