mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Update BitmapMask-frag.js
This commit is contained in:
parent
6c459eb3d5
commit
0e364321e6
1 changed files with 0 additions and 17 deletions
|
@ -15,33 +15,16 @@ module.exports = [
|
|||
' vec4 mainColor = texture2D(uMainSampler, uv);',
|
||||
' vec4 maskColor = texture2D(uMaskSampler, uv);',
|
||||
'',
|
||||
' // float alpha = maskColor.a;',
|
||||
'',
|
||||
' // float alpha = (1.0 - maskColor.a);',
|
||||
' // float alpha = (1.0 - maskColor.a) * mainColor.a;',
|
||||
' // alpha *= maskColor.a;',
|
||||
' // float alpha = maskColor.a;',
|
||||
'',
|
||||
' if (!uInvertMaskAlpha)',
|
||||
' {',
|
||||
' mainColor *= maskColor.a;',
|
||||
'',
|
||||
' // alpha *= (maskColor.a);',
|
||||
' }',
|
||||
' else',
|
||||
' {',
|
||||
' mainColor *= (1.0 - maskColor.a);',
|
||||
'',
|
||||
' // alpha *= (1.0 - maskColor.a);',
|
||||
' }',
|
||||
'',
|
||||
' // gl_FragColor = vec4(mainColor.rgb, alpha);',
|
||||
'',
|
||||
' // gl_FragColor = vec4(mainColor.rgb, mainColor.a) * (1.0 - maskColor.a);',
|
||||
'',
|
||||
' gl_FragColor = mainColor;',
|
||||
'',
|
||||
' // gl_FragColor = vec4(mainColor.rgb * alpha, 0.0);',
|
||||
'}',
|
||||
''
|
||||
].join('\n');
|
||||
|
|
Loading…
Reference in a new issue