mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +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)
|
||||
case idx == nv:
|
||||
return "gl_FragCoord"
|
||||
case idx == nv+1:
|
||||
return "gl_FragColor"
|
||||
default:
|
||||
return fmt.Sprintf("l%d", idx-(nv+1))
|
||||
return fmt.Sprintf("l%d", idx-(nv+2))
|
||||
}
|
||||
default:
|
||||
return fmt.Sprintf("l%d", idx)
|
||||
|
@ -757,9 +757,9 @@ void main(void) {
|
||||
vec2 l0;
|
||||
vec4 l1;
|
||||
float l2;
|
||||
l2 = V0;
|
||||
l0 = V1;
|
||||
l1 = gl_FragCoord;
|
||||
l1 = V0;
|
||||
gl_FragColor = V1;
|
||||
l0 = gl_FragCoord;
|
||||
}`,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user