Jump to content

  • Log In with Google      Sign In   
  • Create Account

Naruto-kun

Member Since 15 Oct 2012
Offline Last Active Yesterday, 01:02 PM

#5176030 Sampling the Render target while rendering to it

Posted by Naruto-kun on 25 August 2014 - 11:46 AM

Hi guys

 

I am working on a project where I need to sample the pixel on the render target before the pixel shader returns so I can determine what blend operation I want to use on it (I have several that are color based). Is there any way to sample the render target like this?

 

Thanks

JB




#5169737 Drawing fullscreen triangle without vertex buffers

Posted by Naruto-kun on 28 July 2014 - 07:11 AM

You only need 3. I use that vertex shader example all the time. However I don't see you setting your viewport in that code. Second, what does your VS output look like? I suggest setting a InputLayout that mimics it even though you only use the vertex ID. 3rd, you don't even need to bind a index buffer.

 

Finally, try setting the 4th value of your returned color in the pixel shader to 1.0f as that is your alpha channel if you are using one in your render target. Otherwise the quad may be completely transparent if you are doing alpha blending.




#5169492 What happened to Rastertek?

Posted by Naruto-kun on 27 July 2014 - 08:16 AM

For some reason everything has been wiped off the site. No more tutorials to be found. Anyone know? I need to get hold of their terrain lighting tutorial...




#5149452 ATI and memory leaks

Posted by Naruto-kun on 25 April 2014 - 01:21 PM

My DX11 modules inject graphics into a DX9 program. They only do so on command and not every frame(it is a render to texture cockpit lighting system). The users who are experiencing this problem are all ATI users and they have given me video and screenshot evidence of the VAS usage of the program climbing as they change light intensity settings (Release is called on the resources within a few seconds of stopping at a particular setting since the program is 32bit and running close to the limits of 32bit VAS space). ClearState has been tried but to no avail. All NVIDIA users don't have this problem however and I ran my own tests which showed a momentary spike in VAS within the limits of what I would expect given the amount of resources I am handling but it drops back down almost immediately after the unloading is complete.

 

I found through Google that this occurs in several DX11 games on ATI cards as well so its definitely not an isolated issue either.




#5142356 Geometry shaders

Posted by Naruto-kun on 26 March 2014 - 11:51 AM

I was thinking I could handle that with constant variables initialized in shader instead of on the CPU.




#5141746 Geometry shaders

Posted by Naruto-kun on 24 March 2014 - 11:37 AM

struct VS_Output
{  
    float4 Pos : SV_POSITION;              
    float2 Tex : TEXCOORD0;
};

VS_Output VS(uint id : SV_VertexID)
{
    VS_Output Output;
    Output.Tex = float2((id << 1) & 2, id & 2);
    Output.Pos = float4(Output.Tex * float2(2,-2) + float2(-1,1), 0, 1);
    return Output;
}



#5136138 DX11, multiple video cards, SLI/Crossfire

Posted by Naruto-kun on 03 March 2014 - 11:50 AM

Urm.....my d3d11 devices are all offscreen renderers and separate from the main program's d3d device which is actually d3d9. Is there nothing I can do to take advantage of this in the code when I create the device?




#5085207 Thanks

Posted by Naruto-kun on 12 August 2013 - 09:37 AM

To those of you who helped me with my various questions on DX11 and shaders...thanks a bunch. Made one of my dreams come true(blending some lighting textures together in a DX9 engine. Gave much better performance).

 

600269_592991770745202_1495416878_n.png

 

945767_592991927411853_1726471843_n.png




#5077937 Multi texturing shader tips needed

Posted by Naruto-kun on 15 July 2013 - 01:17 PM

Perfect. Thanks a bunch.




PARTNERS