Home Technical Talk

Max HLSL directX material issue

Hello Polycount
I am new to these forums. Having discovered this great community through google actually :)

I hate to have to ask for help first thing i do. As i feel one must contribute something before asking.

But anyhow, here goes.

Working for a smaller games company in sweden developing shaders in HLSL.

I use the .fx format to test out my creations in the viewport of max.

I used to run a older version of max (version 8 when doing this testing. Yes yes i know its old :)

So we recently migrated to version 2010. Problems came about when trying to load my older .fx files into the directX material.

The files are read without errors. However there seems to be problems with the loading of bitmap files into the slots of the shader. (oddly enough normal maps come in alright, however diffuse, cubemaps and similar color information does not)

As they come in as striated vertex colors on the model. My theory is that the way the 2D placement node is somehow handled differently in the newer versions of max

I know these shaders run flawlessly in max 8. So the issue must in how the .fx files are read in the new version.

Has anyone else encountered this? And figured out why it happens?

Cheers

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Could you post an image of what the it looks like? I want to say 'Disable LUT/Gamma', but you said the Normal Maps look fine, which means the problem is something else.

    Also, yes, there is a very good chance you might need to change some stuff around for your Pixel/Vertex sections of the code, since Max broke some of them in 2009, but I'm sure someone with more knowledge will help you in that area.
  • Langano
    Options
    Offline / Send Message
    Thanks for a speedy reply.

    Yes sure i can post a screenshot of what it looks like.
    example_diffuse01.jpg

    As you can see the diffuse texture loads in all wonky in max 2010.
    My best guess is that i need to go through a newer .fx file that works in 2010 and later versions and look through that code to indentify the problem.
    However i have yet to find what actually causes it :)
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    that's definitely not right.

    fwiw im still using the same basic shader framework as i was on max9 on 2012 and its working ok
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hmm, strange indeed.

    Have you declared UV's for all the textures?

    Also, are your Mipmaps set to Wrap or Clamp?
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    You have to explicitly set the samplers to Wrap. Before Max 2010 they would default to Wrap, now they default to Clamp.
  • Langano
    Options
    Offline / Send Message
    Hey, thanks for all the help.

    Yes Xoliul, it was the sampler.
    Specified the type and wham!...works like a charm.

    Damn Autodesk for meddling with things :)
Sign In or Register to comment.