#Khaled Posted April 15, 2020 Share Posted April 15, 2020 Hello , how to use with object ? engineApplyShaderToWorldTexture Link to comment
#\_oskar_/# Posted April 15, 2020 Share Posted April 15, 2020 from name txd the object or loop all objects + getElementModel == id object Link to comment
#Khaled Posted April 16, 2020 Author Share Posted April 16, 2020 On 15/04/2020 at 11:39, #\_oskar_/# said: from name txd the object or loop all objects + getElementModel == id object but how i can use photo ( JPG ) with it ? Link to comment
#\_oskar_/# Posted April 17, 2020 Share Posted April 17, 2020 2 hours ago, #Khaled said: but how i can use photo ( JPG ) with it ? dxCreateTexture + dxSetShaderValue Link to comment
#Khaled Posted April 17, 2020 Author Share Posted April 17, 2020 46 minutes ago, #\_oskar_/# said: dxCreateTexture + dxSetShaderValue myTexture = dxCreateTexture( "Photo.png" ) dxSetShaderValue( myTexture, "keycard" ) like ? Link to comment
#\_oskar_/# Posted April 17, 2020 Share Posted April 17, 2020 Texture = dxCreateTexture( "Photo.png") dxSetShaderValue (myShader, "gTexture", Texture) engineApplyShaderToWorldTexture(myShader, "keycard") Link to comment
#Khaled Posted April 17, 2020 Author Share Posted April 17, 2020 21 hours ago, #\_oskar_/# said: Texture = dxCreateTexture( "Photo.png") dxSetShaderValue (myShader, "gTexture", Texture) engineApplyShaderToWorldTexture(myShader, "keycard") اتوقع لو بستخدمه بيطلع باد ارقمنت لان مافيه تعريف لل my shader صحيح ولا ؟ Link to comment
-Ilker. Posted April 18, 2020 Share Posted April 18, 2020 1 hour ago, #Khaled said: اتوقع لو بستخدمه بيطلع باد ارقمنت لان مافيه تعريف لل my shader صحيح ولا ؟ Yup. Link to comment
#Khaled Posted April 18, 2020 Author Share Posted April 18, 2020 1 minute ago, -Ilker. said: Yup. What should I do ? Link to comment
-Ilker. Posted April 18, 2020 Share Posted April 18, 2020 myShader = dxCreateShader ("your file") Link to comment
#Khaled Posted April 18, 2020 Author Share Posted April 18, 2020 1 hour ago, -Ilker. said: myShader = dxCreateShader ("your file") but i want use photo.jpg only ? Link to comment
-Ilker. Posted April 18, 2020 Share Posted April 18, 2020 You need use shader and dxCreateTexture Link to comment
#Khaled Posted April 19, 2020 Author Share Posted April 19, 2020 20 hours ago, -Ilker. said: You need use shader and dxCreateTexture Texture = dxCreateTexture( "Photo.png") dxSetShaderValue (myShader, "gTexture", Texture) engineApplyShaderToWorldTexture(myShader, "keycard") Ok ? Link to comment
#Khaled Posted April 19, 2020 Author Share Posted April 19, 2020 On 18/04/2020 at 02:22, #Khaled said: اتوقع لو بستخدمه بيطلع باد ارقمنت لان مافيه تعريف لل my shader صحيح ولا ؟ 2 hours ago, #\_oskar_/# said: what your problem ? On 17/04/2020 at 05:05, #\_oskar_/# said: Texture = dxCreateTexture( "Photo.png") dxSetShaderValue (myShader, "gTexture", Texture) engineApplyShaderToWorldTexture(myShader, "keycard") Remove myShader Or what ? Link to comment
#\_oskar_/# Posted April 19, 2020 Share Posted April 19, 2020 addEventHandler("onClientResourceStart", resourceRoot, function() local myShader = dxCreateShader([[texture tex;technique os {pass P0 {Texture[0] = tex;}}]]) dxSetShaderValue(myShader, "tex",dxCreateTexture('Photo.png')) engineApplyShaderToWorldTexture(myShader,'keycard') end) try Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now