mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-29 08:26:37 +01:00
Inversion
This commit is contained in:
parent
37e8e87553
commit
dc3517eb3a
3 changed files with 6 additions and 4 deletions
|
@ -107,7 +107,7 @@ public class ChromaticProjectorScreen extends AbstractSimiScreen {
|
|||
.titled(Lang.translate("gui.chromatic_projector.strength"))
|
||||
.withStepFunction(ctx -> step(ctx, 5))
|
||||
.calling(tile::setStrength)
|
||||
.withRange(0, 101)
|
||||
.withRange(-100, 101)
|
||||
.setState((int) (tile.strength * 100));
|
||||
|
||||
Collections.addAll(widgets, blend, rChannel, gChannel, bChannel, fieldEffect, strength);
|
||||
|
|
|
@ -41,8 +41,8 @@ public class FilterSphere {
|
|||
|
||||
surface ? 1 : 0,
|
||||
field ? 1 : 0,
|
||||
strength,
|
||||
0, // padding
|
||||
Math.abs(strength),
|
||||
strength < 0 ? 1 : 0,
|
||||
|
||||
rMask ? 1 : 0,
|
||||
gMask ? 1 : 0,
|
||||
|
|
|
@ -17,7 +17,7 @@ uniform vec3 uCameraPos;
|
|||
struct SphereFilter {
|
||||
vec4 sphere;// <vec3 position, float radius>
|
||||
vec4 d1;// <float feather, float fade, float density, float blend mode>
|
||||
vec4 strength;// <float surfaceStrength, float bubbleStrength, float strength>
|
||||
vec4 strength;// <float surfaceStrength, float bubbleStrength, float strength, float invert>
|
||||
vec4 channelMask;// <vec3 rgb>
|
||||
mat4 colorOp;
|
||||
};
|
||||
|
@ -126,6 +126,8 @@ vec3 applyFilters(vec3 worldDir, float depth, vec3 diffuse) {
|
|||
|
||||
float strength = filterStrength(worldDir, depth, s);
|
||||
|
||||
strength = invert(strength, s.strength.w);
|
||||
|
||||
if (strength > 0) {
|
||||
const float fcon = 0.;
|
||||
|
||||
|
|
Loading…
Reference in a new issue