[done] CustomMaterial

[done] CustomMaterial

Postby ikam » Sunday, 15.September 2013, 12:21

Yop

I updated the CustomMaterial op. It can now support time and transformations...
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: CustomMaterial

Postby Skinnytorus » Sunday, 15.September 2013, 12:45

That is fantastic, man! At last! =D> =D> =D>
Can you post a quick example for reference?
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: CustomMaterial

Postby ikam » Sunday, 15.September 2013, 13:03

Yes of course
You do not have the required permissions to view the files attached to this post.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: CustomMaterial

Postby Skinnytorus » Sunday, 15.September 2013, 13:22

As far as I can see, "time" is now a variable directly inside the pixel shader, right?
I tried to disconnect textures one by one and the result is confusing: from shader code I see that only one sampler 2d is used,
but no sooner that I disconnect a "useless" texture, the shader changes the picture...
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: CustomMaterial

Postby ikam » Sunday, 15.September 2013, 13:30

time is not optimal yet, I will try to link it to modmisc (to bind others variable too)

for texture: look in the pixel shader (the second text)
sampler2D s0 : register(s2);

It's a bad example, because it is not really an explicit code but register(s2) mean the (third texture) (s0 .. 15)
sampler2D s0 <= you can name it as you want, it is just a variable that refer to the register(s2) (the third slot of textures)...
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: CustomMaterial

Postby Skinnytorus » Sunday, 15.September 2013, 13:39

Yeah. It would be cool to control time from Modmisc via spline.
Ahhh. I see. In order for the shader to count input textures, some textures must be present at positions 0 and 1.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: CustomMaterial

Postby Skinnytorus » Sunday, 15.September 2013, 13:52

And I can't see how to change texture projection mode. Is that in model projection mode by default?
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: CustomMaterial

Postby ikam » Sunday, 15.September 2013, 14:13

in custommatarial all is manual. You will need to write the code in the shader to do that.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: CustomMaterial

Postby Skinnytorus » Sunday, 15.September 2013, 14:20

OK. I see. Thanks.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: CustomMaterial

Postby ikam » Sunday, 15.September 2013, 16:50

great it works with a new "customMiscenv" operator, I'll send the update tonight ;)
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: CustomMaterial

Postby Skinnytorus » Sunday, 15.September 2013, 17:20

Awesome! :)
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: CustomMaterial

Postby ikam » Sunday, 15.September 2013, 21:40

Ok it's done.
Updated customMaterial and added A new operator (customMtrlEnv) to control shader variables (like ModMisc...)

and here an example
You do not have the required permissions to view the files attached to this post.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: CustomMaterial

Postby Skinnytorus » Monday, 16.September 2013, 08:17

Cool. I will check this out this evening.
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46

Re: [done] CustomMaterial

Postby ikam » Thursday, 19.September 2013, 15:54

I updated CustomMaterial to simplify the vertex shader.
now code is (same used with CustomIpp) :

Code: Select all
void main
(
  in float3 in_pos : POSITION,
  in float2 in_uv0 : TEXCOORD0,
  out float2 out_uv0 : TEXCOORD0,
  out float4 out_pos : POSITION
)
{
  out_uv0 = in_uv0;
  out_pos = mul(float4(in_pos,1),mvp);
}
You do not have the required permissions to view the files attached to this post.
ikam
Operator
Operator
 
Posts: 911
Joined: Friday, 14.October 2011, 13:00
Location: France

Re: [done] CustomMaterial

Postby Skinnytorus » Thursday, 19.September 2013, 20:33

Cool. Thanks :)
Skinnytorus
Operator
Operator
 
Posts: 1300
Joined: Monday, 06.February 2012, 17:46


Return to New Feature Suggestions



Who is online

Users browsing this forum: No registered users and 0 guests

cron