Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Shader gives error on compilation,but works good otherwise in another application

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 mrheisenberg   Members   

360
Like
0Likes
Like

Posted 18 August 2012 - 12:58 PM

In a sample application by Intel,that demonstrates deferred shading,everything works perfectly.When I try to compile their files,I get: error X3000: syntax error: unexpected token '>' here:
Texture2DMS<float4, MSAA_SAMPLES> gGBufferTextures[4] : register(t0);
I'm literally using the same compile method as in the Intel example:

std::string msaaSamplesStr;
{
std::ostringstream oss;
oss << MSAASamples;
msaaSamplesStr = oss.str();
}


D3D10_SHADER_MACRO defines[] = { {"MSAA_SAMPLES", msaaSamplesStr.c_str()}, {0, 0} };


LPCSTR profile = "ps_5_0"
LPCTSTR fileName = L"GBuffer.hlsl";
LPCSTR entryPoint = "GBufferPS";

UINT shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS | D3D10_SHADER_PACK_MATRIX_ROW_MAJOR;
ID3D10Blob *bytecode = 0;
ID3D10Blob *errors = 0;
D3DX11CompileFromFile(fileName, defines, 0, entryPoint, profile, shaderFlags, 0, 0, &bytecode, &errors, 0);

My feature level is 11 just like the Intel code,I'm not sure what I have missed that would cause the shader to not compile properly on my program.

EDIT:The '>' error is what I get when I output the ''errors'' blob.

Edited by mrheisenberg, 18 August 2012 - 01:01 PM.


#2 Flimflam   Members   

665
Like
0Likes
Like

Posted 18 August 2012 - 11:57 PM

How is MSAASamples defined on line 4? Given the specific error you're encountering, I'm inclined to think it's somehow ending up blank or otherwise nonsensical.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.