mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
The default BaseShader
vertex shader will now set the fragCoord
varying to be the viewport height minus the y inPosition. This will give the correct y axis in the fragment shader, causing 'inverted' shaders to display normally when using the default vertex code.
This commit is contained in:
parent
48bf3d2b5e
commit
f792fce9cb
2 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
### Updates
|
||||
|
||||
* `Zones` will now use the new `customHitArea` property introduced in 3.17 to avoid their hit areas from being resized if you specified your own custom hit area (thanks @rexrainbow)
|
||||
* The default `BaseShader` vertex shader will now set the `fragCoord` varying to be the viewport height minus the y inPosition. This will give the correct y axis in the fragment shader, causing 'inverted' shaders to display normally when using the default vertex code.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ var BaseShader = new Class({
|
|||
|
||||
'void main () {',
|
||||
'gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
'fragCoord = inPosition;',
|
||||
'fragCoord = vec2(inPosition.x, uViewMatrix[2][0] - inPosition.y);',
|
||||
'}'
|
||||
].join('\n');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue