Fix gamma, add Glad, error if glad is compiled with emscripten
This commit is contained in:
@@ -67,7 +67,8 @@ const char * fs_plain =
|
||||
|
||||
"void main()"
|
||||
"{"
|
||||
" FragColor = texture( palette, vec3( 0, 0, index ) ).rgba;"
|
||||
" vec4 color = texture( palette, vec3(0,0,index)).rgba;"
|
||||
" FragColor = vec4(pow(vec3(color),vec3(1.0/2.2)),color.a);"
|
||||
"}";
|
||||
|
||||
const char * fs =
|
||||
@@ -102,6 +103,6 @@ const char * fs =
|
||||
" float specular = pow(abs(dot(normalize(Normal), halfwayDir)), 32.0);\n"
|
||||
" float diffuse = abs(dot(normalize(Normal), lightDir));\n"
|
||||
|
||||
" vec3 result = (0.5 + 1.5*diffuse + 4*specular) * color.rgb;\n"
|
||||
" FragColor = vec4(result, color.a)*1/2.2;\n"
|
||||
" vec3 result = pow((0.5 + 0.5*diffuse + 1.5*specular) * color.rgb, vec3(1.0/2.2));\n"
|
||||
" FragColor = vec4(result, color.a);\n"
|
||||
"}";
|
||||
|
||||
Reference in New Issue
Block a user