pdiddles03 Posted March 20, 2018 Share Posted March 20, 2018 I need an inverse filter to show that an enemy is hit, does this exist in phaser? Link to comment Share on other sites More sharing options...
PsichiX Posted March 20, 2018 Share Posted March 20, 2018 if not this is the simplest shader so you can just copy default filter and modify its one line that sets its color: `gl_FragColor = vec4(vec3(1.0) - color.rgb, color.a)` Link to comment Share on other sites More sharing options...
pdiddles03 Posted March 21, 2018 Author Share Posted March 21, 2018 15 hours ago, PsichiX said: if not this is the simplest shader so you can just copy default filter and modify its one line that sets its color: `gl_FragColor = vec4(vec3(1.0) - color.rgb, color.a)` It's fascinating this is not something that is implemented into phaser to make it easier. I mean its in PIXI and phaser uses pixi Link to comment Share on other sites More sharing options...
pdiddles03 Posted March 21, 2018 Author Share Posted March 21, 2018 Nevermind, i just decided to use tint with a series of colors that change on a timer to show a hit. Link to comment Share on other sites More sharing options...
PsichiX Posted March 21, 2018 Share Posted March 21, 2018 @pdiddles03 you can always have second pure white sprite with the same alpha as original and render it over original when got hit (tinting with red if you want to) and blinking it to show hit. Link to comment Share on other sites More sharing options...
Recommended Posts