Having some issues using ashli and 3ds max
trying to make shaders using Ashli and 3ds. i get it to export, i tried a simple one with a simple diffuse map, but the fx file only seems to come out with emisive, diffuse, and speculor COLOR with no support for textures. How do i make this work?
Indy to Pro: Journeyhttp://phiendstudios.blogspot.com
ok, managed to get it to work, now onto the second issue. These shaders are biased to ATI and will not run in FX composer (the native shader editor for my engine, Kaneva game platform.) and if it doesn't run in fx composer chances are it wont run in kaneva eather.
here is my code.. i'm not a programer, so i'm really relying on 3ds max to be able to generate my shaders for me. So if anyone could help, point out the basic conversions i should make to this code (so i can add it to future ones) to make this compatible in fx composer. I cannot express how much this would help.
thankyou
Matrix mIWorld_0_0 : WORLDI;Matrix mWorldViewProj_0_0 : WORLDVIEWPROJECTION;float Opacity_1_0 : OPACITY<string UIName = "Opacity";float UIMin = 0.0;float UIMax = 1.0;float UIStep = 0.01;> = 0.000000f;float SpecularLevel_1_0 : SPECULARLEVEL<string UIName = "SpecularLevel";float UIMin = 0.0;float UIMax = 1.0;float UIStep = 0.01;> = 0.000000f;float GlossLevel_1_0 : GLOSSLEVEL<string UIName = "GlossLevel";float UIMin = 0.0;float UIMax = 100.0;float UIStep = 1.0;> = 0.000000f;float4 LightDir0_1_0 : DIRECTION<string Object = "TargetLight";string UIName = "LightDir0";int refID = 0;> = {0.000000f, 0.000000f, 0.000000f, 0.000000f};float4 LightCol0_1_0 : LIGHTCOLOR<int LightRef = 0;> = {0.000000f, 0.000000f, 0.000000f, 0.000000f};float4 Emissive_1_0 : EMISSIVE<string UIName = "Emissive";> = {0.000000f, 0.000000f, 0.000000f, 0.000000f};float4 Specular_1_0 : SPECULAR<string UIName = "Specular";> = {0.900000f, 0.900000f, 0.900000f, 1.000000f};texture BumpTex<int Texcoord = 0;int MapChannel = 1;string UIName = "BumpTexture";string name = "BumpTex";>;texture DiffuseTex<int Texcoord = 0;int MapChannel = 1;string UIName = "DiffuseTexture";string name = "DiffuseTex";>;sampler BumpTexSampler = sampler_state{texture = (BumpTex);MinFilter = Linear;MagFilter = Linear;MipFilter = Linear;AddressU = WRAP;AddressV = WRAP;AddressW = WRAP;};sampler DiffuseTexSampler = sampler_state{texture = (DiffuseTex);MinFilter = Linear;MagFilter = Linear;MipFilter = Linear;AddressU = WRAP;AddressV = WRAP;AddressW = WRAP;};VertexShader VS_pass0 = asm{vs_2_0// Generated by ATI's Ashli Compiler on 2006-12-19 23:55:05.// Ashli Version: 1.4.8// Instructions (Alu): 18// Instructions (Tex): 0// Registers (Temp): 3// Registers (Constant): 9// Registers (Color): 0// Registers (TexCoord): 0// Registers (Texture): 0// Registers (Output): 0dcl_position0 v0dcl_normal0 v2dcl_tangent0 v6dcl_texcoord0 v8def c0, 0, 0, 0, 0mul r0, c8, v0.rmad r0, c7, v0.g, r0mad r0, c6, v0.b, r0mad r0, c5, v0.a, r0mov r1, c0.rdp4 r1.r, c4, v2dp4 r1.g, c3, v2dp4 r1.b, c2, v2dp4 r1.a, c1, v2mov r2, c0.rdp4 r2.r, c4, v6dp4 r2.g, c3, v6dp4 r2.b, c2, v6dp4 r2.a, c1, v6mov oPos, r0mov oT0, r1mov oT5, v8mov oT3, r2};PixelShader PS_pass0 = asm{ps_2_0// Generated by ATI's Ashli Compiler on 2006-12-19 23:55:05.// Ashli Version: 1.4.8// Instructions (Alu): 51// Instructions (Tex): 2// Registers (Temp): 6// Registers (Constant): 9// Registers (Color): 0// Registers (TexCoord): 3// Registers (Texture): 2// Registers (Output): 1dcl t0.rgbadcl t3.rgbadcl t5.rgbadcl_2d s0dcl_2d s1def c0, 0, 1, 0.3, 0.5def c8, 0, 0, 0, 1texld r0, t5, s1texld r1, t5, s0add r0, r0, -c0.amov r2, c0.rmul r2.r, r0.r, c0.bmul r2.g, r0.g, c0.bmov r2.b, r0.bdp3 r0.r, r2, r2rsq r0.r, r0.rmul r0, r0.r, r2mov r2, c0.rmov r2.rgb, t3mov r2.a, t3.bdp3 r3.r, r2, r2rsq r3.r, r3.rmul r3, r3.r, r2mul r3, r3, r0.gmov r4, c0.rmov r4.rgb, t0mov r4.a, t0.bdp3 r5.r, r4, r4rsq r5.r, r5.rmul r4, r5.r, r4crs r5.rgb, r2, r4mov r5.a, c0.rdp3 r2.r, -r5, -r5rsq r2.r, r2.rmul r2, r2.r, -r5mad r2, r2, r0.r, r3dp3 r3.r, r4, r4rsq r3.r, r3.rmul r3, r3.r, r4mad r0, r3, r0.b, r2dp3 r0.r, r0, c4max r0.r, r0.r, c0.rmin r0.r, r0.r, c0.gmul r0, r1, r0.rmov r2, c6mad r1, r2, r1, c8mov r2, c0.rmov r2.rgb, c5mov r2.a, c0.gmad r0, r2, r0, r1mov r3, c0pow r1.r, r3.r, c3.rmul r1.r, r1.r, c2.rmul r1, c7, r1.rmad r0, r2, r1, r0mov r0.a, c1.rmov oC0, r0};technique technique0{pass{VertexShaderConstant[1] = <mIWorld_0_0[3]>;VertexShaderConstant[2] = <mIWorld_0_0[2]>;VertexShaderConstant[3] = <mIWorld_0_0[1]>;VertexShaderConstant[4] = <mIWorld_0_0[0]>;VertexShaderConstant[5] = <mWorldViewProj_0_0[3]>;VertexShaderConstant[6] = <mWorldViewProj_0_0[2]>;VertexShaderConstant[7] = <mWorldViewProj_0_0[1]>;VertexShaderConstant[8] = <mWorldViewProj_0_0[0]>;PixelShaderConstant[1] = <Opacity_1_0>;PixelShaderConstant[2] = <SpecularLevel_1_0>;PixelShaderConstant[3] = <GlossLevel_1_0>;PixelShaderConstant[4] = <LightDir0_1_0>;PixelShaderConstant[5] = <LightCol0_1_0>;PixelShaderConstant[6] = <Emissive_1_0>;PixelShaderConstant[7] = <Specular_1_0>;Sampler[1] = (BumpTexSampler);Sampler[0] = (DiffuseTexSampler);VertexShader = <VS_pass0>;PixelShader = <PS_pass0>;}}bool UseLPRT = true;
here is my code.. i'm not a programer, so i'm really relying on 3ds max to be able to generate my shaders for me. So if anyone could help, point out the basic conversions i should make to this code (so i can add it to future ones) to make this compatible in fx composer. I cannot express how much this would help.
thankyou
Indy to Pro: Journeyhttp://phiendstudios.blogspot.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement