- Home /
Sampling a texture in a shader at half/fourth quality.
I am using a camera with a render shader and rendertocubemap() functions to create realtime reflections. All objects are rendered with the render shader so that they can be rendered quicker than their full-quality counterparts. However, the render shader still samples the textures of the objects at full resolution. Is there a way to sample the textures in a shader at half or 1/4 resolution?
Answer by SuperNovaDom94 · Oct 24, 2015 at 08:14 PM
Why don't you set your texture resolution in the quality settings to half/quarter/eighth.
it should work in theory..
The main camera still needs to render with full resolution textures, but the realtime reflection cube map camera should render at lower resolutions. However, I did look into Camera.OnPreRender and Camera.OnPostRender, and I might be able to set the texture quality, render to cube map, then set it back, but I haven't tried this yet.
Perhaps you can set the shader lod or manipulate the texture in the shader (tex2Dbias, tex2Dlod)