Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualvinnyhalts

Posted 08 March 2013 - 02:06 PM

The only thing I can thing of is that the alpha in your gun source textures must be partially transparent. That would explain the difference you're seeing between render target and no render target.

As a quick test, in your shader try replacing this:

return color * AmbientColor * AmbientIntensity +
color * DiffuseIntensity * DiffuseColor * diffuse +
color * SpecularColor * specular;

with

float4 temp = color * AmbientColor * AmbientIntensity +
color * DiffuseIntensity * DiffuseColor * diffuse +
color * SpecularColor * specular;
temp.a = 1; // Force alpha to be 1
return temp;

 

Yeah, that did it. It seems to be working now. It's a bit jagged, but that's another problem for another time. Thank you very much. I would not have known it was the textures, as I am using public domain models and textures.

rgRTcwI.png

 

Edit: I fixed the Anti aliasing, I just turned up my multisampling. Just in the event anyone should read this and need help:

http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rendertarget2d_members.aspx

 

 

 

NbjMOK2.png


#2vinnyhalts

Posted 08 March 2013 - 02:06 PM

The only thing I can thing of is that the alpha in your gun source textures must be partially transparent. That would explain the difference you're seeing between render target and no render target.

As a quick test, in your shader try replacing this:

return color * AmbientColor * AmbientIntensity +
color * DiffuseIntensity * DiffuseColor * diffuse +
color * SpecularColor * specular;

with

float4 temp = color * AmbientColor * AmbientIntensity +
color * DiffuseIntensity * DiffuseColor * diffuse +
color * SpecularColor * specular;
temp.a = 1; // Force alpha to be 1
return temp;

 

Yeah, that did it. It seems to be working now. It's a bit jagged, but that's another problem for another time. Thank you very much. I would not have known it was the textures, as I am using public domain models and textures.

rgRTcwI.pngEdit: I fixed the Anti aliasing, I just turned up my multisampling. Just in the event anyone should read this and need help:

http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.rendertarget2d_members.aspx

 

NbjMOK2.png


#1vinnyhalts

Posted 08 March 2013 - 01:58 PM

The only thing I can thing of is that the alpha in your gun source textures must be partially transparent. That would explain the difference you're seeing between render target and no render target.

As a quick test, in your shader try replacing this:

return color * AmbientColor * AmbientIntensity +
color * DiffuseIntensity * DiffuseColor * diffuse +
color * SpecularColor * specular;

with

float4 temp = color * AmbientColor * AmbientIntensity +
color * DiffuseIntensity * DiffuseColor * diffuse +
color * SpecularColor * specular;
temp.a = 1; // Force alpha to be 1
return temp;

 

Yeah, that did it. It seems to be working now. It's a bit jagged, but that's another problem for another time. Thank you very much. I would not have known it was the textures, as I am using public domain models and textures.

rgRTcwI.png


PARTNERS