English 中文(简体)
How can I tell if HLSL shader code is valid for a given shader version?
原标题:

In Ogre, when loading HLSL shaders you specify a target PS/VS e.g SM2.0, SM 3.0. Are there tools for HLSL (and I guess other shader languages) which will tell me what shader-model versions a given HLSL function/file is valid as? For instance we wrote shaders for SM3.0 by default but for all I know they are valid as SM2.0.

最佳回答

Start with a low shader version and work your way up until it compiles. Its not elegant but it works.

问题回答

暂无回答




相关问题
Direct3D Sprite->SetTransform usage?

I draw textures using the D3DXSprite. I want to transform them(rotate, scale etc..) so I use the SetTransfrom method. Should I, store the old transformation -> set a new one -> draw -> set the old one?...

How are 3D games so efficient? [closed]

There is something I have never understood. How can a great big PC game like GTA IV use 50% of my CPU and run at 60fps while a DX demo of a rotating Teapot @ 60fps uses a whopping 30% ?

How do I check for a 32-bit z-buffer using Managed Direct3D?

I understand that a call to Manager::CheckDepthStencilMatch should get me an answer, but so far I have not been able to gather the pieces required to make this call effectively. In particular, I need ...

Multi-monitor 3D Application

I ve been challenged with a C++ 3D application project that will use 3 displays, each one rendering from a different camera. Recently I learned about Ogre3D but it s not clear if it supports output ...

From Direct3d to OpenGL

I currently rewrite an old Visual Basic application in java, a large part of the work involves replacing Direct3d with jogl. Since I have no experience in dealing with Direct3d and only minimal ...

Stretch blit in DirectX results in jagged edges

I have a Direct3D app which runs windowed or fullscreen at a fixed res (say 800x600). To support widescreen modes, I render to the back buffer at 800x600 and then use Blt to draw the final frame into ...

OpenGL for space simulators [closed]

with a few friends we started this amateur platform-independent java-based project for a space combat simulator game (something like the long dead saga of wing commander). None of us though is a 3D ...

热门标签