rssprimitive3DMaterial (primitive3deffects)

Rate:You need to be logged in to vote
Rating:5 (2 Votes)
Resource: Primitive3DEffects v0.3.0
Author: Ren712

This resource is translation of Image2Material3D effects for dxDrawMaterialPrimitive3D
function. The archive consists of shaders and classes. They are placed in separate files so you
just copy what you need. So no exported functions - just c_resource_test lua file as an example.
The effects are visible on a pirateship spawning point in Las Venturas. Type /teleport to get there.

primitive2D_preTint - creates an image drawn before gtasa screen tint
primitive3D_manual - this effect draws an image in 3D world provided camera matrix.
primitive3D_noZ - unlike the manual version - this one uses matrices passed by gtasa
primitive3D - this is like primitive3D_noZ but zEnabled (enabled depth testing)
primitive3D_line - creates cylindrical billboard based on 2 points in space and width
primitive3D_corona - primitive3D transformed to recreate corona
primitive3D_corona_dir - primitive3D transformed to recreate directional corona
primitive3D_corona_cylinder - primitive3D transformed to recreate cylindrical corona
primitive3D_corona_soft - as above but as soft particle
primitive3D_corona_nomat - coronalike effect spotlight calculation
primitive3D_corona_datk_nomat - came as above but different blending
primitive3D_blend - same as primitive3D but with 'add' blending mode
primitive3D_nrm - adds to primitive3D a bump mapped specular.
primitive3D_nrm_dis - same as primitive3D_nrm but adds a simple parallax displacement effect
primitive3D_wave - uses dxSetShaderTeselation and vertex shader transformation to create a
wave effect known in shader_flag example
primitive3D_soft - when the quad intersects with the environment it fades gradually (like a soft particle)
primitive3D_soft_blend - same as primitive3D_soft but with 'add' blending mode
primitive3D_frustumLight - adds a frustum light consisting of 6 quads and 1 spherical billboard
primitive3D_searchLight - adds a searchlight consisting of 1 cylindrical and 1 spherical billboard
primitive3D_searchLightAlt - as above, except a 3D light shaft instead of a cylindrical billboard
primitive3D_searchLightAltNoCor - as above, except no corona
primitive3D_searchLightAltNoCorSoft - as above plus soft particle effect
primitive3D_bezier2 - adds a textured quadratic bezier curve line material
primitive3D_bezier3 - adds a textured cubic bezier curve line material
primitive3D_cylinder_bezier2 - adds a textured quadratic bezier curve cylinder
primitive3D_cylinder_bezier3 - adds a textured cubic bezier curve cylinder
primitive3D_lightBall - adds a sphere with projected cube texture
primitive3D_sphere_nrm_dis_rt - adds a sphere with displacement map and reflection texture
primitive3D_ring - adds a ring shape
primitive3D_cylinder - adds a cylinder shape
primitive3D_ring_ap - adds a ring shape (with alpha channel)
primitive3D_cylinder_ap - adds a cylinder shape (with alpha channel)
primitive3D_arrow -adds an arrow
primitive3D_sphere_grid - adds a transparent gridded sphere shape
primitive3D_cone_grid - adds a transparent gridded cone shape

All the effects can draw the material as spherical billboard (always facing the camera).
Just set sIsBillboard boolean variable to true.

Most of the effects will work with just shader model 2.0 GFX.


Comments (0) | Download latest version | Report

Version history

Version Publish Date Changes
0.3.0 2020-01-11 22:09:20 First public release Download