Timeline for Displaying a RenderTexture in 2D
Current License: CC BY-SA 4.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 16, 2022 at 14:02 | comment | added | Mangata |
It's shader parameters or shader settings. channel is a colloquial term, sorry for misleading. I added some clarifications, hope it helps : )
|
|
| Jun 16, 2022 at 14:00 | history | edited | Mangata | CC BY-SA 4.0 |
added 1133 characters in body
|
| Jun 16, 2022 at 13:22 | comment | added | Matt Gregory | I don't know what you mean by "texture channel". The only thing the manual says about channels has to do with ARGB color channels. Is that what you mean? | |
| Jun 16, 2022 at 13:21 | comment | added | Matt Gregory | No, I changed it to my material, the one I made with my RenderTexture. Sorry, I left that part out. I manually created a material and I set....well, I actually had to hack it and change the shader to Standard before it would let me put my texture in the Albedo property. This makes the preview window go a little dark, but I can change the shader back to Sprites/Default and that fixes the preview window colors. So the preview window displays my sprite fine, but my square is still white in the end. I don't know, I guess I'm getting confused by a design gap in the Unity editor. | |
| Jun 16, 2022 at 6:00 | comment | added | Mangata | The old version of unity allows you to use this unique texture channel in Sprites/Default, but it will not have any effect, this field has been disabled in the new version of unity. | |
| Jun 16, 2022 at 5:57 | comment | added | Mangata | 1. You get a black square not because it is transparent, but because it is affected by lighting, you need to add light to the scene. 2. You're getting a white square because it's using the default material, which doesn't have an extra texture channel to put your renderTexture on, because it's a spriteRenderer, and it's forcing to use that only texture channel to show the sprite. | |
| Jun 16, 2022 at 2:13 | comment | added | Matt Gregory | Now I right-click on my scene again > 2D Object > Sprites > Square, scale it up to 50x50, and this time I get a white square. I drag the RenderTexture onto it and of course it doesn't work. But in the Square properties, I see a Material field in there. I can set it to my RenderTexture and it accepts it no problem. Except for nothing happens to the display of the square. It's still a white square. My question is why doesn't it do anything? What is the point of that material property if it doesn't show you the texture you put in the material you assign to it? | |
| Jun 16, 2022 at 2:00 | comment | added | Matt Gregory | Thanks! I appreciate the effort you put into that answer, but I'm left throughly confused by it. Let me ask the question by giving my impressions about what is happening: When I right-click on my scene > 3D Object > Quad, and scale it up to (x,y) = (50,50), I get a dark square. I guess it's transparent because I can see everything I drag it over. Anyway, I have my RenderTexture ready to go and I can drag it onto the quad and see my sprite. I look in the quad properties and I see a Materials section, Element 0 = my RenderTexture. | |
| Jun 15, 2022 at 18:06 | history | answered | Mangata | CC BY-SA 4.0 |