|
|
@ -4872,13 +4872,13 @@ namespace olc |
|
|
|
"layout(location = 2) in vec4 aCol;\n" |
|
|
|
"layout(location = 2) in vec4 aCol;\n" |
|
|
|
"out vec2 oTex;\n" |
|
|
|
"out vec2 oTex;\n" |
|
|
|
"out vec4 oCol;\n" |
|
|
|
"out vec4 oCol;\n" |
|
|
|
"uniform float mosaic;\n" |
|
|
|
"uniform int mosaic;\n" |
|
|
|
"\n" |
|
|
|
"\n" |
|
|
|
"void main(){\n" |
|
|
|
"void main(){\n" |
|
|
|
"float p = 1.0 / aPos.z;\n" |
|
|
|
"float p = 1.0 / aPos.z;\n" |
|
|
|
"gl_Position = p * vec4(aPos.x, aPos.y, 0.0, 1.0);\n" |
|
|
|
"gl_Position = p * vec4(aPos.x, aPos.y, 0.0, 1.0);\n" |
|
|
|
"oTex = p * aTex;\n" |
|
|
|
"oTex = p * aTex;\n" |
|
|
|
"oCol = vec4(aCol.r,mosaic,0,aCol.a);\n" |
|
|
|
"oCol = vec4(aCol.r,float(mosaic)/255.0,0,aCol.a);\n" |
|
|
|
"}"; |
|
|
|
"}"; |
|
|
|
locShaderSource(m_nVS, 1, &strVS, NULL); |
|
|
|
locShaderSource(m_nVS, 1, &strVS, NULL); |
|
|
|
locCompileShader(m_nVS); |
|
|
|
locCompileShader(m_nVS); |
|
|
@ -4963,7 +4963,7 @@ namespace olc |
|
|
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
|
|
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
|
|
|
locUseProgram(m_nQuadShader); |
|
|
|
locUseProgram(m_nQuadShader); |
|
|
|
GLint myUniformLocation = glGetUniformLocation(m_nQuadShader, "mosaic"); |
|
|
|
GLint myUniformLocation = glGetUniformLocation(m_nQuadShader, "mosaic"); |
|
|
|
glUniform1f(myUniformLocation,1.0f); |
|
|
|
glUniform1i(myUniformLocation,0); |
|
|
|
locBindVertexArray(m_vaQuad); |
|
|
|
locBindVertexArray(m_vaQuad); |
|
|
|
|
|
|
|
|
|
|
|
#if defined(OLC_PLATFORM_EMSCRIPTEN) |
|
|
|
#if defined(OLC_PLATFORM_EMSCRIPTEN) |
|
|
|