more interesseting sss
This commit is contained in:
@@ -150,11 +150,10 @@
|
|||||||
vec3 sssSun = vec3(0.,-5.,-7.0);
|
vec3 sssSun = vec3(0.,-5.,-7.0);
|
||||||
vec3 tosssSunVec = normalize(sssSun - v_fragPos);
|
vec3 tosssSunVec = normalize(sssSun - v_fragPos);
|
||||||
vec3 tosssSun = normalize(vec3(0.0,-100.,1.));
|
vec3 tosssSun = normalize(vec3(0.0,-100.,1.));
|
||||||
float ssDistortion = 1.;
|
float ssDistortion = 0.1;
|
||||||
float sssIntensity = .2;
|
float sssIntensity = 1.;
|
||||||
vec3 halfWay = normalize(tosssSun+norm*ssDistortion);
|
vec3 halfWay = normalize(tosssSun+norm*ssDistortion);
|
||||||
float ssScateringCoef = pow(clamp(dot(toCameraVector,-halfWay),0.0,1.0),5.) * sssIntensity;
|
float ssScateringCoef = pow(clamp(dot(toCameraVector,-halfWay),0.0,1.0),5.) * sssIntensity;
|
||||||
|
|
||||||
//Sun glittering
|
//Sun glittering
|
||||||
float glitterFactor = max(0.0,dot(tosssSunVec,reflect(-toCameraVector,norm)));
|
float glitterFactor = max(0.0,dot(tosssSunVec,reflect(-toCameraVector,norm)));
|
||||||
if(!(glitterFactor > 0.98)) {
|
if(!(glitterFactor > 0.98)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user