Dreikblack Posted June 5 Share Posted June 5 Last steam beta. Lightning now is broken in my project with any values of gamma in shader or game code until they are both 1.0 Default: Camera->SetGamma(1.0f); Only in shader gamma 1.0: How should be and looks like gamma 1.0 in shader AND game code Quote Link to comment Share on other sites More sharing options...
Josh Posted June 6 Share Posted June 6 Camera:SetGamma controls the final linear to sRGB color conversion, and is a setting meant for adjusting a game's brightness levels for the monitor. It does not affect the sRGB to linear color conversion, which can be changed by modifying the GAMMA value in Shaders/Khronos/tonemapping.glsl. Every screenshot above looks as I would expect. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 6 Author Share Posted June 6 So i still have to fix shader manually with every update when it changed What about gamma max value then? And is not it too bright by default? Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted June 6 Solution Share Posted June 6 Except for the recent activity, that is a shader file that never changes. You could make the file read-only if you want to protect it. There is no max gamma value. The default is 2.2, which is the correct value to convert linear to sRGB. The first render looks correct, but keep in mind: Quake is a dark game and those textures were designed before sRGB was in use in games. You have a directional light plus PBR diffuse and specular lighting brightening the scene. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 6 Author Share Posted June 6 1 hour ago, Josh said: There is no max gamma value. The default is 2.2, which is the correct value to convert linear to sRGB. I meant camera::SetGamma values. Quote Link to comment Share on other sites More sharing options...
Josh Posted June 6 Share Posted June 6 31 minutes ago, Dreikblack said: I meant camera::SetGamma values. So did I Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Dreikblack Posted June 6 Author Share Posted June 6 11 hours ago, Josh said: You have a directional light plus PBR diffuse and specular lighting brightening the scene. Without diffuse and specular maps still looks wrong. Anyway even if i fix shader and gamma for all cameras manually the Editor still needs a gamma settings then to fix it there. Also gamma settings would be nice for Camera in the Editor entity properties to avoid creating extra component and applying it every time 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.