Skip to content

Commit

Permalink
Merge branch '2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
trifox committed Jun 16, 2019
2 parents 2a556d6 + 66ffe2d commit c0dd791
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 32 deletions.
63 changes: 31 additions & 32 deletions 2018/shadertoy/001-XT-Kali-Underwater-Creature/ShaderMaker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ static CFFGLPluginInfo PluginInfo (
"SX01", // *** Plugin unique ID (4 chars) - this must be unique for each plugin
"SoM ST Living XT", // *** Plugin name - make it different for each plugin
1, // API major version number
006, // API minor version number
00, // API minor version number
1, // *** Plugin major version number
002, // *** Plugin minor version number
003, // *** Plugin minor version number
// FF_EFFECT, // Plugin type can always be an effect
FF_SOURCE, // or change this to FF_SOURCE for shaders that do not use a texture
"SoM Kali Living Creature Extended", // *** Plugin description - you can expand on this
Expand Down Expand Up @@ -223,7 +223,7 @@ mat3 rotationMatrix3(vec3 v, float angleDegree)
// util library end

const int Iterations = 25;
const float detail = .02;
const float detail = .01;
const vec3 lightdir = -vec3(0., 1., 0.);

float Scale = inputVector1.x*2.0 -2.0 ;
Expand Down Expand Up @@ -303,8 +303,8 @@ mat3 rots[3] = mat3[3](
rotationMatrix3(normalize(RotVectors[1] ), RotAngles[1] ),
rotationMatrix3(normalize(RotVectors[2] ), RotAngles[2] ));

vec3 color(vec3 p) {
p = objectScale* (p + objectTranslate)* objectRotation;
vec3 color(vec3 p) {
p = (objectScale * p) * objectRotation + objectTranslate;
vec3 pp = p;
float l;
float ot = 9999.;
Expand Down Expand Up @@ -343,9 +343,9 @@ vec3 light(in vec3 p, in vec3 dir) {



vec3 raymarch(in vec3 from, in vec3 dir, vec2 fragCoord)
vec4 raymarch(in vec3 from, in vec3 dir, vec2 fragCoord)
{
vec3 col = vec3(0.);
vec4 col = vec4(0.);
float st = 0.0;
float d = 1.0;
float totdist = 0;
Expand All @@ -355,16 +355,16 @@ vec3 raymarch(in vec3 from, in vec3 dir, vec2 fragCoord)
{
p = from + totdist*dir ;
d = de(p);
totdist += d *0.9;
totdist += d ;
}

}
// vec3 backg = vec3(.4, .5, .55)*(1. + fragCoord.y / iResolution.y*1.5);
if (d<detail) {
col = light(p - detail*dir, dir)+0.1;
if (d<=detail) {
col = vec4(light(p - detail*dir, dir)+0.1,1.0);
}
else {
col = vec3(0.0,0.0,0.0);
col = vec4(0.0,0.0,0.0,0.0);
// col = dir;
}
// col = mix(col, vec3(backg), 1.0 - exp(-.002*totdist*totdist));
Expand All @@ -382,17 +382,16 @@ void mainImage(out vec4 fragColor, in vec2 fragCoord)
rot = mat2(cos(-.5), sin(-.5), -sin(-.5), cos(-.5));
dir.yz = dir.yz*rot;
from.yz = from.yz*rot;
vec3 col = raymarch(from, dir, fragCoord);
col *= max(0., .1 - length(uv*.05)) / .1;
fragColor = vec4(col, 1.);
vec4 col = raymarch(from, dir, fragCoord);
col.xyz *= max(0., .1 - length(uv*.05)) / .1;
fragColor = col ;

}




float de(vec3 p) {
p = objectScale* (p + objectTranslate)* objectRotation;

p = (objectScale * p) * objectRotation + objectTranslate;
float l;
for (int i = 0; i<Iterations; i++) {
p.xy = abs(p.xy);
Expand All @@ -412,7 +411,7 @@ float de(vec3 p) {

}
l = length(p);
return l*pow(-Scale, -float(Iterations));
return l*pow(-Scale, -float(Iterations))-0.01;
}


Expand Down Expand Up @@ -461,7 +460,7 @@ ShaderMaker::ShaderMaker() :CFreeFrameGLPlugin()



SetParamInfo(FFPARAM_VECTOR1_X, "kaliScale", FF_TYPE_STANDARD, 0.4f);
SetParamInfo(FFPARAM_VECTOR1_X, "kaliScale", FF_TYPE_STANDARD, 0.35f);
SetParamInfo(FFPARAM_VECTOR1_Y, "Object X", FF_TYPE_STANDARD, 0.5f);
SetParamInfo(FFPARAM_VECTOR1_Z, "Object Y", FF_TYPE_STANDARD, 0.5f);
SetParamInfo(FFPARAM_VECTOR1_W, "Object Z", FF_TYPE_STANDARD, 0.5f);
Expand All @@ -472,25 +471,25 @@ ShaderMaker::ShaderMaker() :CFreeFrameGLPlugin()
SetParamInfo(FFPARAM_VECTOR5_Z, "Object Elevation", FF_TYPE_STANDARD, 0.1f);


SetParamInfo(FFPARAM_VECTOR2_X, "Julia1 X", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR2_Y, "Julia1 Y", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR2_Z, "Julia1 Z", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR2_W, "Angle 1", FF_TYPE_STANDARD, 0.86f);
SetParamInfo(FFPARAM_VECTOR2_X, "Julia1 X", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR2_Y, "Julia1 Y", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR2_Z, "Julia1 Z", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR2_W, "Angle 1", FF_TYPE_STANDARD, 0.0f);

SetParamInfo(FFPARAM_VECTOR6_X, "Azimut 1", FF_TYPE_STANDARD, 0.1f);
SetParamInfo(FFPARAM_VECTOR6_Y, "Latitude 1", FF_TYPE_STANDARD, 0.1f);


SetParamInfo(FFPARAM_VECTOR3_X, "Julia2 X", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR3_Y, "Julia2 Y", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR3_Z, "Julia2 Z", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR3_W, "Angle 2", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR3_X, "Julia2 X", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR3_Y, "Julia2 Y", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR3_Z, "Julia2 Z", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR3_W, "Angle 2", FF_TYPE_STANDARD, 0.0f);


SetParamInfo(FFPARAM_VECTOR4_X, "Julia 3 X", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR4_Y, "Julia 3 Y", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR4_Z, "Julia 3 Z", FF_TYPE_STANDARD, 0.65f);
SetParamInfo(FFPARAM_VECTOR4_W, "Angle 3", FF_TYPE_STANDARD, 0.26f);
SetParamInfo(FFPARAM_VECTOR4_X, "Julia 3 X", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR4_Y, "Julia 3 Y", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR4_Z, "Julia 3 Z", FF_TYPE_STANDARD, 0.3f);
SetParamInfo(FFPARAM_VECTOR4_W, "Angle 3", FF_TYPE_STANDARD, 0.0f);


//SetParamInfo(FFPARAM_VECTOR5_W, "-------------", FF_TYPE_STANDARD, 0.5f);
Expand All @@ -499,7 +498,7 @@ ShaderMaker::ShaderMaker() :CFreeFrameGLPlugin()
SetParamInfo(FFPARAM_VECTOR6_Z, "Azimut 2", FF_TYPE_STANDARD, 0.2f);
SetParamInfo(FFPARAM_VECTOR6_W, "Latitude 2", FF_TYPE_STANDARD, 0.2f);

SetParamInfo(FFPARAM_VECTOR7_X, "Azimut 3", FF_TYPE_STANDARD, 0.86f);
SetParamInfo(FFPARAM_VECTOR7_X, "Azimut 3", FF_TYPE_STANDARD, 0.4f);
SetParamInfo(FFPARAM_VECTOR7_Y, "Latitude 3", FF_TYPE_STANDARD, 0.4f);
//SetParamInfo(FFPARAM_VECTOR7_Z, "------------ 7 Z", FF_TYPE_STANDARD, 0.5f);
//SetParamInfo(FFPARAM_VECTOR7_W, "------------ 7", FF_TYPE_STANDARD, 0.5f);
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# 2018 +

2.2.0 - [2019-06-16]

- default kali xt parameters to 0 angle for having a clean square starter
- kali xt transformation adjustment
- kali xt alpha channel is used for background

2.1.0 - [2019-04-25]

- fine tune kali xt parameters:
Expand Down
Binary file modified release/plugins/SoM-ST-XT-001-Kali-Underwater.dll
Binary file not shown.
Binary file modified release/plugins32bit/SoM-ST-XT-001-Kali-Underwater.dll
Binary file not shown.

0 comments on commit c0dd791

Please sign in to comment.