Skip to content

Commit

Permalink
move include
Browse files Browse the repository at this point in the history
  • Loading branch information
archibate committed Aug 7, 2024
1 parent a9160be commit a788e68
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions assets/orange.frag
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ uniform mat4 uniModel;
uniform mat4 uniView;
uniform mat4 uniProjection;

vec3 filmic(vec3 x) {
vec3 X = max(vec3(0.0), x - 0.004);
vec3 result = (X * (6.2 * X + 0.5)) / (X * (6.2 * X + 1.7) + 0.06);
return pow(result, vec3(2.2));
}

vec3 aces(vec3 x) {
const float a = 2.51;
const float b = 0.03;
const float c = 2.43;
const float d = 0.59;
const float e = 0.14;
return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);
}

vec3 gammaCorrect(vec3 x) {
return pow(x, vec3(1/2.2));
}
// vec3 filmic(vec3 x) {
// vec3 X = max(vec3(0.0), x - 0.004);
// vec3 result = (X * (6.2 * X + 0.5)) / (X * (6.2 * X + 1.7) + 0.06);
// return pow(result, vec3(2.2));
// }
//
// vec3 aces(vec3 x) {
// const float a = 2.51;
// const float b = 0.03;
// const float c = 2.43;
// const float d = 0.59;
// const float e = 0.14;
// return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);
// }
//
// vec3 gammaCorrect(vec3 x) {
// return pow(x, vec3(1/2.2));
// }

vec3 unreal(vec3 x) {
return x / (x + 0.155) * 1.019;
Expand Down
File renamed without changes.

0 comments on commit a788e68

Please sign in to comment.