Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMigi0027

Posted 08 October 2013 - 11:19 PM

Alright, I boiled the issue down, and it seemed to be an external issue (Sorry about that).

 

It seems to happen when sampling a texture in a loop (I've done it before, so I don't know why it should cause problems):

float4 textureDistorted(
	float2 texcoord, 
	float2 direction,
	float3 distortion 
) {
	return float4(
		t_dff.Sample(ss, texcoord + direction * distortion.r).r,
		t_dff.Sample(ss, texcoord + direction * distortion.g).g,
		t_dff.Sample(ss, texcoord + direction * distortion.b).b,
		1.0
	);
}
.......
for (int i = 0; i < uSamples; ++i) { // PS. the uSamples is a constant in the shader, so it should unroll the loop
	float2 offset = frac(texcoord + ghostVec * float(i));
		
	float weight = length(float2(0.5, 0.5) - offset) / length(float2(0.5, 0.5));
	weight = pow(1.0 - weight, 10.0);
	
	result += textureDistorted(
		offset,
		normalize(ghostVec),
		distortion
	) * weight; // <- If this command is removed (the textureDistorted), my driver doesn't crash. Though I can use it outside a loop...
}

-MIGI0027

Heh, the topic kind of changed here, just tell me if you see something terribly wrong here.


#1Migi0027

Posted 08 October 2013 - 11:18 PM

Alright, I boiled the issue down, and it seemed to be an external issue (Sorry about that).

 

It seems to happen when sampling a texture in a loop (I've done it before, so I don't know why it should cause problems):

float4 textureDistorted(
	float2 texcoord, 
	float2 direction,
	float3 distortion 
) {
	return float4(
		t_dff.Sample(ss, texcoord + direction * distortion.r).r,
		t_dff.Sample(ss, texcoord + direction * distortion.g).g,
		t_dff.Sample(ss, texcoord + direction * distortion.b).b,
		1.0
	);
}
.......
for (int i = 0; i < uSamples; ++i) {
	float2 offset = frac(texcoord + ghostVec * float(i));
		
	float weight = length(float2(0.5, 0.5) - offset) / length(float2(0.5, 0.5));
	weight = pow(1.0 - weight, 10.0);
	
	result += textureDistorted(
		offset,
		normalize(ghostVec),
		distortion
	) * weight; // <- If this command is removed (the textureDistorted), my driver doesn't crash. Though I can use it outside a loop...
}

-MIGI0027

Heh, the topic kind of changed here, just tell me if you see something terribly wrong here.


PARTNERS