Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizations to filter effects, blend targets, and batching. #461

Merged
merged 2 commits into from Oct 24, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Address review comments.

  • Loading branch information
gw3583 committed Oct 24, 2016
commit e4213ac1cbfaa8d792967d32a1639da40d7c430e
@@ -37,22 +37,25 @@ vec3 hsvToRgb(vec3 c) {
float residualHue = hue - float(sector);

vec3 pqt = c.z * vec3(1.0 - c.y, 1.0 - c.y * residualHue, 1.0 - c.y * (1.0 - residualHue));
if (sector == 0)
return vec3(c.z, pqt.z, pqt.x);
if (sector == 1)
return vec3(pqt.y, c.z, pqt.x);
if (sector == 2)
return vec3(pqt.x, c.z, pqt.z);
if (sector == 3)
return vec3(pqt.x, pqt.y, c.z);
if (sector == 4)
return vec3(pqt.z, pqt.x, c.z);
return vec3(c.z, pqt.x, pqt.y);
switch (sector) {
case 0:
return vec3(c.z, pqt.z, pqt.x);
case 1:
return vec3(pqt.y, c.z, pqt.x);
case 2:
return vec3(pqt.x, c.z, pqt.z);
case 3:
return vec3(pqt.x, pqt.y, c.z);
case 4:
return vec3(pqt.z, pqt.x, c.z);
default:
return vec3(c.z, pqt.x, pqt.y);
}
}

vec4 Blur(float radius, vec2 direction) {
// TODO(gw): Support blur in WR2!
return vec4(1, 1, 1, 1);
return vec4(1.0);
}

vec4 Contrast(vec4 Cs, float amount) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.