Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local shaders={
- ["images/extDoor2.dds"]={"lasjmdoorgud","trail_door","comptdoor1","comptdoor2",},
- ["images/extDoors1.dds"]={"compdoor4_lae","compdoor1_lae","compdoor5_lae",},
- ["images/spraytag.dds"]={"aztecas",},
- ["images/asphalt.dds"]={"villainnwall02_128","block2","ws_rooftarmac1","compfence1_lae",},
- ["Images/roofTiles1.dds"]={"shingles3","awningsides2",},
- ["images/bxground.dds"]={"ab_stripped_floor",},
- ["images/lightWood1.dds"]={"cj_lightwood","cj_lightwood(e)","telepole128",},
- ["images/garageDoor1.dds"]={"compdoor2_lae",},
- ["images/window1.dds"]={"laspedhus7",},
- ["images/sofaFabric1.dds"]={"CJ_FAB4",},
- ["images/window2.dds"]={"laspedhus8","laspedhus9","comptwall18",},
- ["images/window3.dds"]={"laspedhus3",},
- ["images/window4.dds"]={"laspedhus2","acrooftop1256",},
- ["images/houseBot.dds"]={"lostonclad1",},
- ["images/wallpaint.dds"]={"comptwall23","comptwall32","comptwall10","comptwall10",},
- ["images/roofTiles2.dds"]={"comptroof1","comptroof2",},
- ["images/woodWall1.dds"]={"des_sherrifwall1","comptwall6","trail_wall4",},
- ["Images/redground.dds"]={"carpark_128",},
- ["Images/woodWall2.dds"]={"trail_wall1","trail_wall2","trail_wall3","sw_woodflloor","sjmhoodlawn9s","des_dustconc","trail_side1","bbar_wall2",},
- ["images/floorTiles1.dds"]={"brickred",},
- ["Images/graff2.dds"]={"lvswelvomesign02",},
- ["images/graff3.dds"]={"rifa",},
- }
- function setupShaders()
- for fileName,textures in pairs(shaders) do
- local shader = dxCreateShader ("shader.fx",1,100,false,"object")
- local texture = dxCreateTexture (fileName)
- dxSetShaderValue (shader,"CUSTOMTEX0", texture )
- shaders[fileName].shader=shader
- end
- end
- setupShaders()
- -- code for object creation loop (assuming object is identified as "object"
- for _,data in pairs(shaders) do
- local shader=data.shader
- for _,texture in pairs(data) do
- if type(texture)=="string" then
- engineApplyShaderToWorldTexture(shader,texture,object)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment