Sign in to follow this  
JeViCo

render 3D objects in window (dx)

Recommended Posts

try to use createStaticImage (here put the size and the Cordi...lile ( 80,20,25,25) ," Name of image .png" ) --------------------------------then the Image will be showing  in your Window

Share this post


Link to post
17 minutes ago, LilDawage said:

try to use createStaticImage (here put the size and the Cordi...lile ( 80,20,25,25) ," Name of image .png" ) --------------------------------then the Image will be showing  in your Window

i don't want to take picture of each vehicle :ph34r:. I'm going to make little dxCreateScreenSource (image) of this vehicle and i need some sort of advice for this action

--- i haven't done it before

Edited by Juuve

Share this post


Link to post
11 hours ago, Juuve said:

Thank you and @Ren_712 for this script. I was looking for it but

screenshot_1.jpg

This is a shader or vehicle problem? I can simply draw something on back to hide holes but can i fix it somehow?

The window/lights need to be placed below the rest of the car in the hierarchy treeview of a modeling program maybe.
Add me to Skype.

Edited by JustinMTA

Share this post


Link to post
14 hours ago, Juuve said:

Thank you and @Ren_712 for this script. I was looking for it but

This is a shader or vehicle problem? I can simply draw something on back to hide holes but can i fix it somehow?

@Juuve It's not really a vehicle problem, that's how the alpha channel is handled in this effect. I'd have to rewrite it ...
If you don't want draw the vehicle post gui use this: https://www.solidfiles.com/v/mdy5QRqrMraZ2 or use non mrt variant instead

  • Thanks 1

Share this post


Link to post
7 hours ago, Ren_712 said:

@Juuve It's not really a vehicle problem, that's how the alpha channel is handled in this effect. I'd have to rewrite it ...
If you don't want draw the vehicle post gui use this: https://www.solidfiles.com/v/mdy5QRqrMraZ2 or use non mrt variant instead

Thank you! Using non mrt shader solved my problem xD

But now i can't place any image on the background. I used dxDrawImage.

Mta_game_proccess.png

As the game ordering says i should use onClientPreRender to draw the image (before fx) but it becomes invisible then. I can also create an object, draw an image on it and set player's camera position facing toward the object. But i don't think that this is a good idea\ :ph34r:

p.s. PostGUI and second render target options don't work with this shader for some reason

Edited by Juuve

Share this post


Link to post

the nonMRT effect transforms view and projection matrix to render the resized object/vehicle/ped close to the near clipping plane. So the vehicle is drawn on the screen when "GTA draws world'. the MRT effect draws the vehicle to a renderTarget that can be drawn dxDrawImage (onClientRender).

Example: https://nightly.mtasa.com/files/shaders/shader_multi_rt_test.zip

Edited by Ren_712
  • Like 2

Share this post


Link to post
16 hours ago, Ren_712 said:

the nonMRT effect transforms view and projection matrix to render the resized object/vehicle/ped close to the near clipping plane. So the vehicle is drawn on the screen when "GTA draws world'. the MRT effect draws the vehicle to a renderTarget that can be drawn dxDrawImage (onClientRender).

Example: https://nightly.mtasa.com/files/shaders/shader_multi_rt_test.zip

ok, i understand it now. Thank you!

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.