mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
shaaderir: Use gl_FragColor
This commit is contained in:
parent
da4d5b1338
commit
125f85effe
@ -219,8 +219,10 @@ func (p *Program) glslBlock(b *Block, level int, localVarIndex int) []string {
|
|||||||
return fmt.Sprintf("V%d", idx)
|
return fmt.Sprintf("V%d", idx)
|
||||||
case idx == nv:
|
case idx == nv:
|
||||||
return "gl_FragCoord"
|
return "gl_FragCoord"
|
||||||
|
case idx == nv+1:
|
||||||
|
return "gl_FragColor"
|
||||||
default:
|
default:
|
||||||
return fmt.Sprintf("l%d", idx-(nv+1))
|
return fmt.Sprintf("l%d", idx-(nv+2))
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return fmt.Sprintf("l%d", idx)
|
return fmt.Sprintf("l%d", idx)
|
||||||
|
@ -757,9 +757,9 @@ void main(void) {
|
|||||||
vec2 l0;
|
vec2 l0;
|
||||||
vec4 l1;
|
vec4 l1;
|
||||||
float l2;
|
float l2;
|
||||||
l2 = V0;
|
l1 = V0;
|
||||||
l0 = V1;
|
gl_FragColor = V1;
|
||||||
l1 = gl_FragCoord;
|
l0 = gl_FragCoord;
|
||||||
}`,
|
}`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user