Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

HLSL Vertex Textures in V5

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
hummerbaendiger
Posts: 21
Joined: 22 Mar 2012, 15:54

HLSL Vertex Textures in V5

Post by hummerbaendiger » 27 Jun 2016, 12:58

Hi,

I was wondering how to use vertex textures in HLSL shaders in V5... In V4 you were able to define the texture stage as Vertex1 or Vertex2.
Was this changed to the displacement map stage (would make most sense)? I tried with this code snippet, but it looks like the texture isn't sampled at all (no displacement):

float4x4 WorldViewProjection : WORLDVIEWPROJECTION;

sampler Vertex1 : register(s0);
float lod=0;

// Vertex shader program input
struct VS_INPUT
{
float4 Position : POSITION;
float4 Texcoord : TEXCOORD0;

};

// Vertex shader program output
struct VS_OUTPUT
{
float4 Position : POSITION;
float4 Texcoord : TEXCOORD0;
};


// Vertex Shader Program

VS_OUTPUT VS( VS_INPUT Input )
{
VS_OUTPUT Output;

Output.Texcoord = Input.Texcoord;
float4 displace = tex2Dlod(Vertex1,float4(Input.Texcoord.xy,0,lod));
Output.Position = mul(Input.Position + displace, WorldViewProjection);

return Output;
}

Also the option to explicitly define the texture stage has gone as well with the new material system. Or is there any way to define or overwrite one specific stage?

Thanks for any hints, Flo

User avatar
lerou
Posts: 345
Joined: 06 Sep 2013, 07:14
Location: Hamburg, Germany

Re: HLSL Vertex Textures in V5

Post by lerou » 29 Jun 2016, 12:38

Would be nice to get the answer.

Until then: Copy paste the old nodes from V4 ;)

User avatar
Dennis
Posts: 384
Joined: 08 Jun 2015, 11:29

Re: HLSL Vertex Textures in V5

Post by Dennis » 29 Jun 2016, 13:16

Hey..
I forwarded the issue already to our specialist.. he is out of the office for some days and will reply asap :)

All the best
Dee

(Typos from mobile)

neuston
Posts: 3
Joined: 23 Sep 2016, 08:03

Re: HLSL Vertex Textures in V5

Post by neuston » 23 Sep 2016, 09:32

Is there any update from the specialist?

User avatar
Dierk Ohlerich
Posts: 74
Joined: 10 Jul 2012, 09:01
Location: Hamburg, Germany

Re: HLSL Vertex Textures in V5

Post by Dierk Ohlerich » 26 Sep 2016, 09:52

yes, Copy paste the old nodes from V4 is the way to do it for now.
-- Dierk Ohlerich

Post Reply