• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
TheOrestes

Fx Shader weird Culling Issue

7 posts in this topic

[font=courier new,courier,monospace]Hi,[/font]

[font=courier new,courier,monospace]Am facing weird culling issue with My post processing shader. Right now, Post processing shader does nothing but draws the scene as it is on the screen space aligned quad with back buffer surface as a texture. [/font]

[font=courier new,courier,monospace]To my surprise, the real problem is with weird culling issue that is occuring only on the nvidia cards. Everything works fine when demo is run on ati cards. Attached is the screenshots for both the cards. I tried setting cullmode to all 3 modes both inside CPP code & in shader technique as well, but am unable to figure out real cause for the problem.[/font]

[font=courier new,courier,monospace]Attached is the basic shader code for post process setup. [/font][font=courier new,courier,monospace][code]// Global Shader Variables
texture gScreenTexture;[/font]
[font=courier new,courier,monospace]// Samplers
sampler screenSampler = sampler_state
{
Texture = <gScreenTexture>;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = WRAP;
AddressV = WRAP;
};[/font]
[font=courier new,courier,monospace]/////////////////////////////////////////////////////////////////////[/font]
[font=courier new,courier,monospace]// The vertex shader does not do any transformation, coordinates
// are allready in clipping space.
VS_OUTPUT VS( float4 Pos:POSITION, float2 Tex:TEXCOORD0 )
{
VS_OUTPUT output = (VS_OUTPUT)0;
output.Pos=Pos;
output.Tex = Tex;
return output;
}[/font]
[font=courier new,courier,monospace]// Default
float4 PS(VS_OUTPUT pIn):COLOR0
{
float4 rgb = tex2D ( screenSampler, pIn.Tex);
return rgb;
}[/font]
[font=courier new,courier,monospace]/////////////////////////////////////////////////////////////////////
// tecnique name needs to correspond to the value passed
// to the GetTechniqueByName method
technique Default
{
pass p0
{
VertexShader = compile vs_3_0 VS();
PixelShader = compile ps_3_0 PS();
}
}
[/code][/font]

[font=courier new,courier,monospace]I can be rest assured that setup required for the Post processing is done in the correct way using DirectX. Screenshots for all post processing effects achieved so far on ATI cards can be seen on this blog of mine : [url="http://rupeshmandke.blogspot.in/"]http://rupeshmandke.blogspot.in/[/url][/font]

[font=courier new,courier,monospace]Any guidance will be much appreciated. [/font]

[font=courier new,courier,monospace]Thanks,[/font]
[font=courier new,courier,monospace]rmandke. [/font]
0

Share this post


Link to post
Share on other sites
Do you have the debug runtimes enabled? You can turn it on from the DirectX control panel.
0

Share this post


Link to post
Share on other sites
[quote name='MJP' timestamp='1333960734' post='4929487']
Do you have the debug runtimes enabled? You can turn it on from the DirectX control panel.
[/quote]

[font=courier new,courier,monospace]Hi,[/font]

[font=courier new,courier,monospace]Yes, I do have debug runtimes enabled. It gives me warning about "[/font][font=courier new,courier,monospace]Ignoring redundant SetSamplerState", something like :[/font]

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 13

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 14

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 25

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 15

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 16

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 17

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 18

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 19

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 20

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 21

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 29

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 30

Direct3D9: (WARN) :Ignoring redundant SetRenderState - 8

Direct3D9: (WARN) :Ignoring redundant SetRenderState 8

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 13

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 14

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 25

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 15

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 16

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 17

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 18

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 19

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 20

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 21

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 29

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 30

Direct3D9: (WARN) :Ignoring redundant SetRenderState - 8

Direct3D9: (WARN) :Ignoring redundant SetRenderState 8

Direct3D9: (WARN) :Ignoring redundant SetSamplerState Sampler: 0, State: 13

[font=courier new,courier,monospace]Thanks for the quick reply though .. Please guide me in how i can debug this issue. The problem is somehow specific only on nvidia cards [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img][/font][font=courier new,courier,monospace] [/font]
0

Share this post


Link to post
Share on other sites
[font=courier new,courier,monospace]Hi,[/font]

[font=courier new,courier,monospace]Anyone has any information on this issue? Has anyone ever faced such weird culling issues?[/font]
[font=courier new,courier,monospace]Any help would be appreciable [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img][/font][font=courier new,courier,monospace] [/font]
0

Share this post


Link to post
Share on other sites
This shader looks fine. I want to see the shader that draws the dwarf and the code that calls this shader.

Or better yet, upload the example and I can execute it in my machine (I have an NVIDIA car, a GeForce 560Ti). This could help to find driver problems or something similar.

Bye.

Ps: I don’t have antivirus (never had), so no virus please.
0

Share this post


Link to post
Share on other sites
Hi jischeider,

I just lost this thread. Can you mail me your personal mail id so that i can mail you the code?
Please message me your mail id :)

Regards.
0

Share this post


Link to post
Share on other sites
Hi Guys,

First of all thanks a lot for giving attention to my problem. I was not able to look at the problem till today, when i decided to give PIX a final shot! And guess what! I have solved the mystery ...hmm.. maybe partially, I mean am getting the desired output right now, no weird culling issue anymore on nvidia card :)
Solution? Well, I had this in the device creation code :
[CODE]
d3dpp.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES;
[/CODE]
I changed it to [b]D3DMULTISAMPLE_NONE[/b] & the problem was resolved! how i got this idea? So, i started debugging using PIX for single frame capture, to my surprise whenever i tried debugging the frame I used to get warning saying multisampling is [b]ON[/b], would you like to turn it [b]OFF [/b]in order to match the output to rendertarget? I was constantly saying yes / no randomly without actually reading the warning completely.

Later on, to my suprise, I noticed that everytime i turned [b]OFF [/b]multisampling output in rendertarget used to be correct i.e. without weird culling issues, when i discarded the warning I used to get renderbuffer with problematic output.
So, I just went back & did the changes! & whoila!!! But still not able to really understand as how the problem has been mitigated though. DirectX doc says, multisampling to be used only when
[i]d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD[/i]; not otherwise.

I had this in my code & still have it. But the problem is gone with disabling multisampling only.
Any idea on this one? It will make me happier if i know the complete reason :)

Cheers,
TheOrestes.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0