Quantcast
Channel: Latest Questions by Monko
Viewing all articles
Browse latest Browse all 34

How to assign a texture and shader

$
0
0
I am trying to procedurally draw a triangle given 3 coordinates. I have the triangle drawn ,but I don't know how to assign a texture and shader to the triangle. Here is my attempt: var shader : Shader; var texture : Texture I don't know how to assign my texture to the variable "texture". I tried to do this: var texture : Texture = ("RockDark") Also, when It comes to shaders, I have no idea how to assign one. Can someone show me the coorect way to assign a texture and shader to the created variables?

Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>