Shader Laboratory
844 subscribers
265 photos
15 videos
59 files
404 links
Shader Laboratory
a channel about shaders in telegram

ID : @smkgames

MyStack : goo.gl/smMuqe 😎👌
Download Telegram
Forwarded from Kamali
This media is not supported in your browser
VIEW IN TELEGRAM
با کمک یکی از دوستان درست شد
#VFX_Graph
Shader Laboratory
GIF
اگر بخواهیم با تغییر زاویه ی دوربین یا View Position تکسچر تغییر کنه باید از View Position برای Offset کردن تکسچر استفاده کنیم
Realistic Water
#ShaderGraph
precision mediump float;

uniform sampler2D uTexture;
varying vec2 vUVtexture;

uniform vec4 fAmount;

vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));

float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}

vec3 hsv2rgb(vec3 c)
{
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);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}

// ------------------------------------------------
// Name: main
// ------------------------------------------------
void main()
{
vec4 color = texture2D( uTexture, vUVtexture );

vec3 rgb;
rgb.x = color.x;
rgb.y = color.y;
rgb.z = color.z;

vec3 hsv = rgb2hsv( rgb );

hsv.y *= fAmount.x;

rgb = hsv2rgb( hsv );

gl_FragColor = vec4( rgb.x, rgb.y, rgb.z, 1.0 );
}

#mobile #RGB2HSV
https://raspberly.hateblo.jp/entry/UnityDojo2019_07

ریاضی در بازی سازی

part1- Formulas and Graphs
Inverse function
Summary

part 2 - How to read
Recurrence formula
Summary

part3 - log
Exponential
Bottom exchange
Summary

part4 - floating point
In fact, the width of float is super wide
double is more amazing
Summary

Part 5 - RPG with sequence
Summary

part6 - easing analysis
Summary

part7 - complex number
Mandelbrot set

part8 - complex number sequence
Summary

Any consultation center
I actually tried
Social gathering
Timeline