REndering the view rings better

This commit is contained in:
samcake 2018-03-09 17:49:50 -08:00
parent e8b5a875d6
commit 4a7d3e8e0e
2 changed files with 7 additions and 5 deletions

View file

@ -17,10 +17,12 @@ in vec4 varColor;
in vec3 varTexcoord;
void main(void) {
float r = sqrt(dot(varTexcoord.xyz,varTexcoord.xyz));
float a = paintStripe(r * varColor.w, 0.0, 1.0 / varColor.w, 0.05 / varColor.w);
if (a <= 0.1 || r > 1.1) {
discard;
if (varColor.w > 0.0) {
float r = sqrt(dot(varTexcoord.xyz,varTexcoord.xyz));
float a = paintStripe(r * varColor.w, 0.0, 1.0 / varColor.w, 0.05 / varColor.w);
if (a <= 0.1 || r > 1.1) {
discard;
}
}
packDeferredFragmentUnlit(

View file

@ -141,5 +141,5 @@ void main(void) {
<$transformEyeToClipPos(cam, proxyPosEye, gl_Position)$>
// Convert region to color
varColor = vec4(colorWheel(float(regionID) / 4.0), regionRadius);
varColor = vec4(colorWheel(float(regionID) / 4.0), -1.0);
}