Questions tagged [rendertexture]

A texture to which content can be rendered.

Filter by
Sorted by
Tagged with
2
votes
1answer
20 views

How to save Unity HDR renderTexture into a .exr file?

[Purpose]: I need to save the Unity camera view into a .exr file. [Error]: Remapping between formats 74 -> 73 is not supported [What I've tried]: I tried the ...
0
votes
1answer
29 views

Why is the Unity pixel color read from RenderTexture bigger than 1?

The pixel color component read from the Unity renderTexture is bigger than 1.0 without HDR environment map. I'm writing a mini program to test the reflectance of Unity PBS. I use six pure white (1,1,1,...
0
votes
0answers
10 views

Unable to draw Primitives on Texture in SharpDX

I have a little problem with rendering in my SharpDX Direct11 App. I had being tested rendering scene on a texture, and then draw this texture on the backBuffer. ...
0
votes
0answers
26 views

How do I pass a temporary render texture generated by a command buffer to a material?

I'm working on an outline effect for my game. I want to do the render buffer based methods since the outlines are imo of much higher quality. I can render the selected objects into the buffer as ...
1
vote
1answer
135 views

What color format, depth buffer should I use in a RenderTexture for WebGL screen output in Unity? Is NPOT ok? MipMaps?

Today I learned about a technique for forcing uniform resolution in a Unity WebGL build, as described here in the answer by DMGregory. Yay! I'm experimenting with implementing this technique on a ...
0
votes
0answers
198 views

Unity RenderTexture Black when Saving PNG on Oculus Quest/Android

I've scoured the web for a possible solution to my problem with no avail. I'm currently trying to add a screenshot function on the Oculus Quest where a player can take a picture from a secondary ...
1
vote
0answers
13 views

I have a problem with updating a RenderTexture being used in combination with a shader

I just can't seem to figure out why I can't save the image I've drawn onto an orthographic RenderTexture. Here's how my scene works: https://i.imgur.com/jAWO2V8.gif Basically, it's a painting effect ...
0
votes
0answers
22 views

Comparing object silhouette with a 3d representation

I'm working on a game where a user can draw the outline of an object, I use it to create a mask texture and I want to compare this outline with a 3d object. The solution I come up with is to render ...
1
vote
1answer
988 views

Issue with Texture2D memory leak in Unity

I have a simple method that converts RenderTexture data into Texture2D ...
0
votes
0answers
68 views

How to project a Matcap correctly in Amplify Shader Editor

Unity's Amplify Shader Editor comes with an example of matcap nodes setup, however, the matcap projection in this example is incorrect. As you can see the texture becomes distorted when it's on de ...
0
votes
1answer
191 views

Render texture seems to ignore camera background type

I'm currently trying to pull a fog of war for an rts game, and planned it like this. (Unity 2020.2.7, URP 10.3.1) Use units field of view to generate a texture of what is seen (alpha 0). Create other ...
0
votes
1answer
34 views

Bake a heightmap from Editor

I want to implement a heightmap-based water simulation algorithm in Unity. I know exactly how I would approach this in pure low-level C++ and OpenGL (and also Shadertoy), and most of it is ...
0
votes
0answers
16 views

Rendertexture skips channels sometimes

When rendering a camera to a render texture (for a portal effect), it seems to under certain circumstances skip rendering the red channel entirely. I cannot put my finger on why this might be ...
0
votes
1answer
62 views

XNA configuration on legacy code

Background: Our biomechanics and Advanced Surgical Technologies Lab wrote a surgery navigation system desktop application in C# around ten years ago. One of its major functions uses XNA Game Studio 4....
0
votes
0answers
34 views

Knowing the size of a framebuffer when rendering transformed meshes to a texture

I have a couple of 2D meshes that make a hierarchical animated model. I want to do some post-processing on it, so I decided to render this model to a texture, so that I could do the post-processing ...
0
votes
0answers
26 views

Per-component Shader Blend in Unity

Context : I'm writing a 2D mobile game in Unity where the graphics are essentially black lines drawn on a background image plus some lighting. Running full RGB calculations for every step seems like a ...
0
votes
0answers
44 views

coloured 3d models rendering issue while running on android

I am using Godot 3.2.2 stable (GLES2) along with kenney 3d nature asset pack (glb) for prototyping a 3d game. Everything works just fine on my desktop computer, but when I deploy the game to my ...
2
votes
0answers
36 views

How to generate a star onto a render texture with spherical warping

How would one proceduraly generate a star in a compute shader that looks like one of thes two at any size needed. Also any way transfer this into a spherical map, would be appreciated. Goal is to ...
1
vote
0answers
58 views

Shadowmapping with multiple light sources

I am using shadow-mapping to add shadows to my world. Currently, I use one lightsource, which means I have to draw my world twice: once in the lightview, once in the camera view. I want to add more ...
1
vote
1answer
44 views

How to use WorldToScreenPoint function in a texture context?

I am rendering a scene into a RenderTexture and I have a set of 3D points. I want to convert these points from 3D to texture coordinate frame. It worked, when I rendered into screen and used ...
0
votes
1answer
866 views

How to convert depth values into Unity's distance

I am new in Unity and now only studying for my work project. I need help with computing real distances from depth values. Can't figure it out. My shader is: ...
0
votes
1answer
758 views

How to capture image from camera with post effects? Mysteriously only get emission(?) pass

I have a separate camera from my main camera, whose purpose is to take screenshots, or render a "live feed" of the action, at different angles. Hierarchy as such: The game object labeled ...
1
vote
1answer
10 views

Unity: Render 1st Texture to 2nd Texture

I want to pass the first texture through a shader and render it to a second texture. The actual task is bit more complicated, as I then want to render the second texture back to the first texture ...
0
votes
0answers
269 views

Unity: Dimensions of color surface does not match dimensions of depth surface

I am receiving the error, "Dimensions of color surface does not match dimensions of depth surface" whenever I attempt to use my screenshot code, without any callstack or anything further insight of ...
1
vote
1answer
671 views

dx11 Rendering to target texture shows only clearcolor(ImGUI-Custom Game Engine)

Im trying to create a game view for my game engine using ImGui framework,however when i try to render texture,there is only clear color displayed on the screen. My plan Creating Render Target ...
0
votes
0answers
24 views

Low resolution RenderTexture with gradients

I have a small RenderTexture that stretched on large object, so texels is near 0.3 of unit. Source for this texture has much more resolution and with gradients. If source little bit changes its ...
0
votes
1answer
460 views

Rendering to Texture with Transparency in Monogame?

Please forgive me if I'm asking a question that has been answered before, but for the life of me, search as I might, I couldn't find a problem exactly like this anywhere. I'm trying to render a ...
1
vote
1answer
397 views

Video feedback effect with recursive RenderTextures in Unity 2018.3

I have a project where I'm playing with a video feedback effect by rendering a camera to a RenderTexture and pointing the camera at a quad displaying that RenderTexture. This works great normally, ...
2
votes
1answer
160 views

Dr.Strange's door in Unity3D, how to put a projected void on a plane?

My question is about a visual trick I would like to perform in Unity3D. I want the player to walk outside a door and see no walls of the room behind them, just the door. They should still be able to ...
1
vote
0answers
368 views

Unity blit() not writing to RenderTexture

I found a nice Gaussian Blur shader online and am attempting to use it to blur a render texture using blit(). However, the render texture remains unblurred. I know for a fact the blur shader works as ...
0
votes
1answer
166 views

How can I pack repeated textures into one texture efficiently?

I have an obj mesh with some textures, several of them are repeated(uvs are not within [0,1]). I'd like to merge all those textures into one texture and transform the uvs of obj.
1
vote
0answers
793 views

Is it possible to crop a render texture in unity?

Basically what I want to do is, take the source render texture from OnRenderImage and crop it (continuously). I've already achieved this by using ...
1
vote
2answers
261 views

Combining multiple diffuse textures into one leaves strange distortions?

I made 3 models, each has own material. And after texture painting, I combined each their texture to single textures for optimization. Currently making Mobile Game with Unity 2018 and using Mobile/...
0
votes
1answer
476 views

Screen Capture rendered on a RenderTexture in Unity

I have a pretty wild idea for a unity application that would work on a multi-display setup. The app would be running in full screen mode on one of my displays, and the contents of the remaining two ...
0
votes
3answers
5k views

How Do I 'Reset' my Render Texture When I Stop a Video Player?

I have a Unity VideoPlayer where I use a render texture with an audio source to play the video. VideoPlayer.Stop pauses the video and resets the time to 0. I want ...
0
votes
1answer
3k views

Using a Compute Shader in Unity to convert a texture to a float array

I have a fairly simple requirement for a compute shader (DirectCompute through Unity). I have a 128x128 texture and I'd like to turn the red channel of that texture into a 1d array of floats. I need ...
0
votes
1answer
304 views

How can I Fade Paint over time?

I want to fading my paint over time like this: but currently It's gray! what Is the problem? Code: ...
0
votes
1answer
2k views

Noticeable quality loss on texture captured using Graphics.Blit vs Shader output directly to a mesh

I'm currently using a GPU shader to generate a texture. I want to be able to capture the output of this out I'm using Graphics.Blit to output the shaders result to a ...
0
votes
1answer
993 views

How to draw geometric shapes to a texture?

How can I create a texture containing a geometric figure using SDL2? I saw there is a way to convert Surface to Texture, and I also saw that there is a way to draw directly to the screen using ...
3
votes
1answer
3k views

Achieving 2D Lighting for Terraria-Like Game

I'm trying to achieve the fog-of-war lighting style that Terraria and Starbound have. Terraria's lighting system seems to be more blocky/tile based, but Starbound's is a lot more smooth. The Desired ...
1
vote
1answer
303 views

Render 2D texture on the cube texture at given location

I would like to simulate a moving sun on the sky. What I have managed to do so far is calculating the exact location of the sun, that is the 3D direction vector from the camera's position in the world ...
2
votes
0answers
670 views

Creating Saving and Loading Materials in Runtime

I'm trying to create a material during runtime like this: In my Assets I have a Render Texture and one Material I created an Script where I attach the Render Texture to Material I save in my project ...
7
votes
5answers
33k views

How can I make my Camera's RenderTexture output have a transparent background?

I'm writing a 3D game using Unity 2017.1.0b1. I have a disabled Camera that takes a "snapshot" of the current scene and stores it in a RenderTexture when a button is clicked. I then display the ...
1
vote
0answers
582 views

get position of GameObject on rendertexture from camera

I'm rendering the camera output to an rendertexture on a plane. This works fine. But I want to put GameObjects on the rendertexture on positions of world objects that are visible on the camera. <...
1
vote
1answer
184 views

Weird streching of a texture in OpenGL

Here is the problem: I'm rendering a red triangle in an offscreen Frame Buffer Object. I have a texture of that Buffer, and i'm applying this texture to a Simple rectangle(at runtime). I get This ...
0
votes
1answer
503 views

SDL2 Draw scene to texture. SDL2 RenderTexture like SFML

I've been developing a 2D Engine using SFML + ImGui. The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObjects ...
0
votes
1answer
40 views

problem in texturing

the first picture is the texture I'm using. and the second is result. problem! the model file it self is no problem. I think the mode is problem. I saw uv coordinates is more than 1. what kind of ...
1
vote
0answers
5k views

How to clear the content of a Rendertexture?

I want to clear the content of a RenderTexture in runtime. Basically I have this script: ...
1
vote
1answer
1k views

Why is my Canvas/RawImage not included in my Camera's RenderTexture output?

In my Unity2D game, I'm using a second camera to "screenshot" the current view. I then display this screenshot within the game. This works the first time I take a screenshot. When taking the second ...
3
votes
2answers
279 views

Why does rendering to a texture cause transparency here?

As a quick background, this is in the context of a custom game engine I'm writing in C# on top of the SharpDX framework. In the engine, when I render UI, I do so by creating a canvas object with its ...