forked from LeenkxTeam/LNXSDK
		
	Update leenkx/Shaders/blur_edge_pass/blur_edge_pass.frag.glsl
This commit is contained in:
		| @ -27,22 +27,22 @@ const float discardThreshold = 0.95; | ||||
| void main() { | ||||
| 	vec3 nor = getNor(textureLod(gbuffer0, texCoord, 0.0).rg); | ||||
| 	 | ||||
| 	fragColor = textureLod(tex, texCoord, 0.0).r * blurWeights[0]; | ||||
| 	fragColor = textureLod(tex, texCoord, 0.0).rgb * blurWeights[0]; | ||||
| 	float weight = blurWeights[0]; | ||||
|  | ||||
| 	for (int i = 1; i < 8; ++i) { | ||||
| 	for (int i = 1; i < 16; ++i) { | ||||
| 		float posadd = i;// + 0.5; | ||||
|  | ||||
| 		vec3 nor2 = getNor(textureLod(gbuffer0, texCoord + i * dirInv, 0.0).rg); | ||||
| 		float influenceFactor = step(discardThreshold, dot(nor2, nor)); | ||||
| 		float col = textureLod(tex, texCoord + posadd * dirInv, 0.0).r; | ||||
| 		float influenceFactor = smoothstep(0.5, discardThreshold, dot(nor2, nor)); | ||||
| 		vec3 col = textureLod(tex, texCoord + posadd * dirInv, 0.0).rgb; | ||||
| 		float w = blurWeights[i] * influenceFactor; | ||||
| 		fragColor += col * w; | ||||
| 		weight += w; | ||||
| 		 | ||||
| 		nor2 = getNor(textureLod(gbuffer0, texCoord - i * dirInv, 0.0).rg); | ||||
| 		influenceFactor = step(discardThreshold, dot(nor2, nor)); | ||||
| 		col = textureLod(tex, texCoord - posadd * dirInv, 0.0).r; | ||||
| 		col = textureLod(tex, texCoord - posadd * dirInv, 0.0).rgb; | ||||
| 		w = blurWeights[i] * influenceFactor; | ||||
| 		fragColor += col * w; | ||||
| 		weight += w; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user