Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 2 3 4 5 … 18 Next »
Get RenderTarget texture names
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Get RenderTarget texture names
09-06-2021, 07:47 PM,
#1
frdhog Offline
Hasn't finished a ship in 2 years
****
Posts: 72
Threads: 31
Joined: Feb 2016
Get RenderTarget texture names
It'd be really handy if we could get a function that is able to get a render target's texture name (starfall_rt_[x]_[width]_[height]) without resorting to brute force or checking the texture list. 
Of course, this would become invalid when an RT is freed and overridden but it would still be invaluable when avoiding rendering common elements multiple times if it is communicated between starfall chips
Website Find
Reply
09-06-2021, 08:02 PM, (This post was last modified: 09-06-2021, 08:03 PM by The17thDoctor. Edited 1 time in total.)
#2
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Get RenderTarget texture names
(09-06-2021, 07:47 PM)frdhog Wrote: It'd be really handy if we could get a function that is able to get a render target's texture name (starfall_rt_[x]_[width]_[height]) without resorting to brute force or checking the texture list. 
Of course, this would become invalid when an RT is freed and overridden but it would still be invaluable when avoiding rendering common elements multiple times if it is communicated between starfall chips

I support this idea, it could be really handy.
Even handier could be to be able to get renders from other screens / emitters ( that we own ) through starfall this way. That way we could make things like simple starfall emitter repeaters and such. ( If its possible )

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
10-06-2021, 10:16 AM,
#3
Red The Blue Color Offline
TSCM Super Donating Member
****
Posts: 422
Threads: 34
Joined: Feb 2015
RE: Get RenderTarget texture names
You can use globaltables and channels to send the RT to different screens/emitters/huds/whatever else renders kek, so making emitter repeaters and etc is rather easy.

"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016

[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
Find
Reply
10-06-2021, 10:35 AM,
#4
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Get RenderTarget texture names
Thought about that too, never tested it. However itd mean that I have to use 2RTs in my render which is doable but not ideal imo.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
10-06-2021, 12:49 PM,
#5
frdhog Offline
Hasn't finished a ship in 2 years
****
Posts: 72
Threads: 31
Joined: Feb 2016
RE: Get RenderTarget texture names
After trying it out, I can't deny the usefulness of sending the object itself but I feel it would be more efficient to just send the texture name itself.

But through my testing, I have found that the name alone doesn't seem to be very helpful as it can't be used with the Material, render.getTextureID or render.setTexture functions. This means we are unable to use 2D render operations such as drawTexturedRectRotated or drawTexturedRectUV. Although I admit a similar effect could be gained with some 3D contexts.

Getting the name would give the ability to get the width and height get if they were lost of somehow, but that would be better suited to a metatable addition.

I realise a texture name may just create more problems (having to create compatability with other render operations) but it allows alternative transportation methods, such as the net library.
Website Find
Reply
10-06-2021, 04:23 PM,
#6
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Get RenderTarget texture names
You can already pass the texture object into render.setTexture(). There's no need to have the name.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread:
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.