Jump to page content
English English   Polish Polish   Dutch Dutch   Russian Russian   German German   Hungarian Hungarian   Norwegian Norwegian   Swedish Swedish   Finnish Finnish   Romanian Romanian   Spanish Spanish   Portuguese Portuguese   Latvian Latvian  
Homepage
Home
Register
Login

Resources
Forum
Wiki
Servers

rssCamera2RenderTarget (cam2rt)

Category:script
Author(s):Ren712
Downloads:922
Rate:You need to be logged in to vote
Rating:4.8 (6 Votes)
Description:
Resource: Camera2RenderTarget v0.2.4
Author: Ren712

This resource adds a possibility to render world from different perspective
- into a separate render target.The world textures are drawn in a separate
render pass - unlike some earlier experiments - in the same frame.

I've decided to provide classes instead of exported functions.

Effects:
cam2RTMirror - this class creates a mirror provided it's matrix and mirror size.
It reminds of gtasa mirrors, but is drawn in native resolution.
cam2RTAlternate - this class creates a parallel world drawn into a separate render target.
cam2RTScreen - this class creates a screen similar to what is seen in 8-track stadium
interior. Required variables are camera matrix, screen matrix and size.
Projection is set based on main camera projection parameters. An additional
setProjection method is available.
cam2RTImage - same as above, but doesn't create in-world screen. Required
variables are camera matrix and render target alpha enable.
Requirements:
The effects require MRT in shader (works with GFX cards with full dx9 support)

Known issues:
The resource draws only what is seen by camera, doesn't stream in anything outside the
main viewport. So expect many things to be culled - Mainly small objects or peds outside
the field of view. It is advised to create this effect only in smaller interiors.
Fog is disabled, most of the shadow textures, stencil shadows, smoke and particles.

Camera2RenderTarget is very experimental - if you see any other issues - please notice me.
Message me at official mta forums (Ren_712) or send me an e-mail (you'll find it in readme file)
...

(more)

Download latest version | Report

Version history

Version Publish Date Changes
0.2.4 2019-03-31 19:45:58 -applied gtasa fog effect
-readjusted the projective texture coordinates
Download
0.2.3 2019-03-10 22:47:02 -modified depth sorting a bit Download
0.2.2 2018-03-29 14:57:08 -Set MipFilter to None (for lightmap) Download
0.2.1 2018-03-03 23:10:32 -Set AlphaTestEnable to false Download
0.2.0 2017-03-18 23:25:02 -Added getRenderTargets method (mirror, alternate) for material3D_corona_* effects
-Added add blend shader variant
Download
0.1.9 2017-03-17 00:29:05 -Added mask and billboard methods Download
0.1.8 2017-03-10 23:54:18 -Added cam2RTAlternate for portal like effect
-Added shadowmapping support
Download
0.1.7 2017-03-04 03:37:43 -Fixed a typo Download
0.1.6 2017-02-26 17:21:24 -Optimized depth testing a bit
-Disabled RT scaling
Download
0.1.5 2017-02-22 11:06:53 -Forgot to update readme Download
0.1.4 2017-02-22 10:55:31 -Set standard RT scale for compatibility
-Fixed some issues that might occur when no MRT in shaders
-Projection matrices for screen and image don't depend on resolution anymore
Download
0.1.3 2017-01-05 14:50:51 -Readded an ability to render at lower than screen resolution.
-Depth and Color render targets are not shared between effects.
Download
0.1.2 2016-10-04 22:53:58 -fixed memory leak (include c_common.lua) Download
0.1.1 2016-05-20 20:36:47 -reverted to 0.0.9 due to issues with some graphics cards. Download
0.1.0 2016-05-20 19:08:48 -Added an ability to render at lower than screen resolution.
-Depth and Color render targets are not shared between effects.
Download
0.0.9 2016-05-16 12:29:09 -Added cam2RTImage class to get usable render target instead of in world 3d screen. Download
0.0.8 2016-05-10 01:18:09 -Fixed size mismatch (between old and new) Download
0.0.7 2016-05-10 01:02:51 -Uses dxDrawMaterialLine3D instead of dxDrawImage.
Pros: Reenables screen tint.
Cons: Anything drawn after dxDrawLine3D - is omitted.
Download
0.0.6 2016-04-08 11:48:21 -Fixed effects not rendering for some graphics cards. Thanks go to sam@ke for the bugfix. Download
0.0.5 2016-04-06 19:48:34 First public release Download