Skip to content
Snippets Groups Projects
Commit 2947e7db authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri :speech_balloon:
Browse files

anari: Don't convert color buffer to sRGB

ANARI uses the linear RGB colorspace and doesn't require the conversion
to a scaled RGB space.
parent 35ba07c4
No related merge requests found
......@@ -62,9 +62,7 @@ public:
bool useHDRI = ren->GetUseImageBasedLighting() && ren->GetEnvironmentTexture() &&
extensions.ANARI_KHR_LIGHT_HDRI;
// The framebuffer is linear, a conversion to sRGB is required
ss << "gl_FragData[0] = vec4(pow(color.rgb, vec3(1.0/2.2)), " << (useHDRI ? "1.0)" : "color.a)")
<< ";\n";
ss << "gl_FragData[0] = vec4(color.rgb, " << (useHDRI ? "1.0)" : "color.a)") << ";\n";
vtkShaderProgram::Substitute(fragShader, "//VTK::FSQ::Impl", ss.str());
this->OpenGLQuadHelper = new vtkOpenGLQuadHelper(openGLRenderWindow,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment