Jump to content

[REL] 50p's fun shaders


50p

Recommended Posts

Hi there people! I have been absent for long time and probably won't be as active as I used to be but I'll do my best. I just found out that MTA can load effect files and I wanted to learn how to write shaders. So far I have written only 1 very simple shader but I've learnt the basics how the whole process works (only pixel shading though) and should have some more.

Here is my very first shader:

- Horizontal flip - it flips your screen horizontally! Imagine that you know all 3 cities in SA. Will you know all the cities if the entire game was flipped horizontally? I bet it will take some time for you to know which turn to take to take you to the place where you want to go. I got lost multiple times when I wanted to get to Grove Street from 4 Dragons Casino.

Download

Link to comment

Wow! Mirrored GTA World! Awesome!

I think some kind of mirrored route races are possible now. :D

50p, your first shader was one of the most interesting, things will get more confusing with this :P

Go and learn shaders more, then you'll be able to make cool shaders such as this one!

Link to comment

Thanks for the comments guys, I didn't know you'll like it. Anyway, a little update:

* added: flipped keys to make the driving easier (Mouse movement is not flipped though, can't think of the easiest way to do it. I don't want to make custom camera control to make it since this shader was made just for fun and shader writing practice)
Link to comment

nice, bud using shaders to flip the image is little overpowered ;)

local w, h = guiGetScreenSize( ) 
screenSrc = dxCreateScreenSource( w, h ) 
addEventHandler( "onClientPreRender", root, function() 
   dxUpdateScreenSource( screenSrc ) 
   dxDrawImage( 0, w, -w, h,screenSrc ) 
end ) 

Link to comment
nice, bud using shaders to flip the image is little overpowered ;)
local w, h = guiGetScreenSize( ) 
screenSrc = dxCreateScreenSource( w, h ) 
addEventHandler( "onClientPreRender", root, function() 
   dxUpdateScreenSource( screenSrc ) 
   dxDrawImage( 0, w, -w, h,screenSrc ) 
end ) 

does it work?

i suppose it shouldnt.

Link to comment
local w, h = guiGetScreenSize( ) 
 screenSrc = dxCreateScreenSource( w, h ) 
 addEventHandler( "onClientPreRender", root, function() 
       dxUpdateScreenSource( screenSrc ) 
       dxDrawImage( w, 0, -w, h,screenSrc ) 
 end ) 

now it's ok, I've misplaced one "w" :oops:

(my rear view mirror script is a prove...)

Link to comment
local w, h = guiGetScreenSize( ) 
 screenSrc = dxCreateScreenSource( w, h ) 
 addEventHandler( "onClientPreRender", root, function() 
       dxUpdateScreenSource( screenSrc ) 
       dxDrawImage( w, 0, -w, h,screenSrc ) 
 end ) 

now it's ok, I've misplaced one "w" :oops:

(my rear view mirror script is a prove...)

Doesn't that flip HUD as well?

Link to comment
local w, h = guiGetScreenSize( ) 
 screenSrc = dxCreateScreenSource( w, h ) 
 addEventHandler( "onClientPreRender", root, function() 
       dxUpdateScreenSource( screenSrc ) 
       dxDrawImage( w, 0, -w, h,screenSrc ) 
 end ) 

now it's ok, I've misplaced one "w" :oops:

(my rear view mirror script is a prove...)

Doesn't that flip HUD as well?

it is PRErender

btw if pre doesnt work, use onClientHUDRender, it is triggered be4 hud is drawn.

Link to comment
  • 2 weeks later...
also add the zoomout and camera roll effect to it(not really a shader)

If I was to make such resource I would add it but it's just a shader and you can add it yourself :) I might add it in the future but first I have to fix MTASE to work with MTA SA 1.1

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...