TextureGenerator | 2D Texture generation using the compute shaders | Generator Utils library
kandi X-RAY | TextureGenerator Summary
kandi X-RAY | TextureGenerator Summary
3D and 2D Texture generation using the compute shaders within the Unity engine.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TextureGenerator
TextureGenerator Key Features
TextureGenerator Examples and Code Snippets
Community Discussions
Trending Discussions on TextureGenerator
QUESTION
I am trying to set the texture of a shader graph material and am having no luck. After following some tutorials and some googling I can't seem to get it working.
So far I have set my scene up with a plane i generated via code and a pre-built one and have applied the material to both of these. I then created a script to set the texture of the MeshRenderer to "_MainTex" as I saw mention several times while googling. I also set the material texture property to "_MainTex".
I also tried the Reference name as well but that also didn't work.
So how do you set the texture of a shader graph material with Universal Render Pipeline via code?
The two planes ingame:
Prebuilt plane's inspector:
Shader Graph:
The script:
...ANSWER
Answered 2020-Apr-14 at 20:15You need to fill out the "Reference" sectionof the shader graph. Instead of Texture2D_234E865, it should read "_MainTex" there. Verify the asset saved by clicking on the shader and looking in the inspector. Under Properties it should list _MainTex. Then you can use your SetTexture code or simply call material.mainTexture, which does the same thing.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TextureGenerator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page