Fix cameras on difficulty creation
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
function update(elapsed)
|
||||
if (FlxG.keys.justPressed.F5)
|
||||
FlxG.resetState();
|
||||
//
|
||||
function update(elapsed:Float)
|
||||
if (FlxG.keys.justPressed.F5) FlxG.resetState();
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma header
|
||||
|
||||
// Used in difficulty screen
|
||||
|
||||
uniform vec4 clipRect;
|
||||
|
||||
bool boxCollision(vec2 pixel, vec4 rect) {
|
||||
return (pixel.x >= rect.x) && (pixel.x < rect.x + rect.z) && (pixel.y >= rect.y) && (pixel.y < rect.y + rect.w);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 pixel = gl_FragCoord.xy;
|
||||
|
||||
if (boxCollision(pixel, clipRect)) gl_FragColor = flixel_texture2D(bitmap, openfl_TextureCoordv.xy);
|
||||
else gl_FragColor = vec4(0.);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma header
|
||||
|
||||
// Used in colorwheel
|
||||
|
||||
vec3 hsvToRgb(vec3 c) { //hsv.x = hue, hsv.y = saturation, hsv.z = value
|
||||
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
||||
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#pragma header
|
||||
#define PI 3.14159265359
|
||||
|
||||
// Used for editors
|
||||
|
||||
int steps = 16;
|
||||
int stepsInside = 2;
|
||||
float strength = 0.0075;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma header
|
||||
|
||||
// Used for editors (faster)
|
||||
|
||||
//#define iResolution _camSize
|
||||
#define getTexture textureCam
|
||||
|
||||
|
||||
Reference in New Issue
Block a user