Super LW Custom Shader

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Super LW Custom Shader // Archive: Tech Forum

1  |  

Post by Johny // Jul 20, 2006, 6:23am

Johny
Total Posts: 672
pic
I try to use LWCustomBrick for create a simple red color, But Don't get a good result.


Can anyone tell me where the error come from?

Post by Asem // Jul 20, 2006, 8:38am

Asem
Total Posts: 255
Johnny try it without trying to declare a RtFloat4.new (I'm not sure if that is an actual call). I think it should just be RtFloat4. You also didn't define tred as a RtFloat4.

function Test(MyCo){

RtFloat4 tred = RtFloat4(1.0, 0.0, 0.0, 1.0);

MyCo = tred;

}

or

function Test(MyCo){

MyCo = RtFloat4(1.0, 0.0, 0.0, 1.0);

}

These will probably work. I have been missing with the shader scripting as well, mostly the hlsl side, and I think this may apply. I can't neccessarily test it myself as I am at school but tell me if it works.

Also as a feature would it possible to have intellisense for the shader functions, if any developers are listening? :D

Post by Asem // Jul 20, 2006, 4:01pm

Asem
Total Posts: 255
From Dev Guide:
Currently there is no trueSpace script object for creating LUA scripts for Super LightWorks materials. They must be created as an external file.


Apparently we can't script lightworks shaders yet, unless they're external :confused:

Post by Johny // Jul 20, 2006, 5:27pm

Johny
Total Posts: 672
pic
Asem thanks for the answer :)

That statement is make when we still on tS7.0. After 7.1 and now 7.11; is it still not implementation yet?

Post by clintonman // Nov 26, 2006, 7:46am

clintonman
Total Posts: 304
pic
I found samples of customer shaders in the Super LW Cartoon library. :jumpy: So you can write lua scripts inside truespace. Here is the format that worked for me to set a plain red color.


function NewFunction(redColor)

-- put function code here

redColor:setx(1.0);

redColor:sety(0.0);

redColor:setz(0.0);

end
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn