50p Posted October 31, 2011 Posted October 31, 2011 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 - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
MetaGamer Posted October 31, 2011 Posted October 31, 2011 good work and please buddy update the MTA Script Editor.
Faw[Ful] Posted November 1, 2011 Posted November 1, 2011 Nice , thats been awhile since I had not seen something funny like that. Mirror racing like in mario kart FTW =Benox50= My Youtube Channel
Xierra Posted November 1, 2011 Posted November 1, 2011 Wow! Mirrored GTA World! Awesome! I think some kind of mirrored route races are possible now. 50p, your first shader was one of the most interesting, things will get more confusing with this Go and learn shaders more, then you'll be able to make cool shaders such as this one! XX3 is gone. This is my new name. :3
50p Posted November 1, 2011 Author Posted November 1, 2011 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) - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
karlis Posted November 1, 2011 Posted November 1, 2011 dont see a mayor problem in lack of that 1)invert mouse 2)profit! [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
CapY Posted November 2, 2011 Posted November 2, 2011 dont see a mayor problem in lack of that1)invert mouse 2)profit! Invert keys if possible
karlis Posted November 2, 2011 Posted November 2, 2011 read 50Ps last post. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Wojak Posted November 2, 2011 Posted November 2, 2011 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 ) create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
karlis Posted November 2, 2011 Posted November 2, 2011 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. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Wojak Posted November 2, 2011 Posted November 2, 2011 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" (my rear view mirror script is a prove...) create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
karlis Posted November 2, 2011 Posted November 2, 2011 oh i thought it just moved the bounds, not inverted the pixels, nice find! [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
50p Posted November 2, 2011 Author Posted November 2, 2011 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" (my rear view mirror script is a prove...) Doesn't that flip HUD as well? - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
karlis Posted November 2, 2011 Posted November 2, 2011 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" (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. [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
Wojak Posted November 2, 2011 Posted November 2, 2011 its impossible to capture hud components and dx elements into screen source, so when you use prerender they are drawn on top create your teleports and interiors in MTA map editor want more excitment in your race map? - add a killer bot you may also add some peds (NPC) - CARMAGEDDON STYLE! 2paq MTA:SA Race Server
MTA Team qaisjp Posted November 3, 2011 MTA Team Posted November 3, 2011 inverted canera can be done using freecam. great stuff 50p
Spanish4Life Posted November 11, 2011 Posted November 11, 2011 Hey, more shaders? It's good but you can do anything more Visit my web pl0x Thanks to all 200 visitors! Please, help me with the web using the contact section VOTE MTA FOR Mod Of The Year Awards 2011!
Faw[Ful] Posted November 11, 2011 Posted November 11, 2011 If you want more , make your own ! =Benox50= My Youtube Channel
Spanish4Life Posted November 11, 2011 Posted November 11, 2011 (edited) but if "shaders" do one more atleast >_> or change it, it sounds like a liar Edited November 11, 2011 by Guest Visit my web pl0x Thanks to all 200 visitors! Please, help me with the web using the contact section VOTE MTA FOR Mod Of The Year Awards 2011!
50p Posted November 12, 2011 Author Posted November 12, 2011 LOL OK, I'll write a black&white shader and use it when you die, you know, like in GTA IV. In fact, I did write such shader but I lost it due to C:\ format - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
karlis Posted November 12, 2011 Posted November 12, 2011 also add the zoomout and camera roll effect to it(not really a shader) [WIP]GTA IV style hud+custom blips + blip text + circular radar areas
50p Posted November 12, 2011 Author Posted November 12, 2011 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 - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now