1 Year Ago
Glass2 (#936) * Start recoding the glass shader from scratch * Apply FrameBufferCopyTexture to entire layer rather than batch, fixes some batches returning a null texture * Let Material API handle translucency opacity properly and accounting for specular, still need to account for tint opacity * Iterate on new glass * Randomize shatterglass normals https://i.imgur.com/8EKzZZ8.mp4 * Add overlay layer and cheap rough refraction * Downsample framebuffercopytexture to be used when needed * Translucent shadows for glass https://i.imgur.com/6KYigbg.png * Redo downsample shader to work properly without flickering, right now with just gaussian since we don't use any others right now * Pass downsample method before ComputeRenderablePassesForContext * Cleanup glass shader, fix VR and Tools preview * glass.shader_c * Update glass materials and glass blur range * Don't dispose of temp rendertarget when trying to resolve it again, GetTemporary gets from dict, fixes multiple ui blur fetches, this solution was causing issues before but seems fine now we're hashing every parameter * Do 1px feathering on CopyFrameBufferCached to avoid sampling without real intersection * Remove hacks from GenerateMips, rewrite downsample_cs to support other mip generation methods * Fix FBCopies showing incorrectly on tools https://i.imgur.com/1MnEiWe.png * Fix comment that slipped through experimentation, add more explaination to Cheap Glass and Overlay Layer