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 6 … 18 Next »
UV issue in drawTexturedRect
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
UV issue in drawTexturedRect
12-07-2020, 09:53 AM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: UV issue in drawTexturedRect
This issue is a long standing annoyance with the way the engine draws textures. Sadly there's no way to avoid some kind of correction to the input values, though adding a "UVHack" parameter isn't the best solution and it's not accounting for the fact that even properly initialised materials have an offset to their co-ordinates.

To help with this, I've added a helper function, render.computeTextureCoords( texture, u, v, endU, endV ) that applies appropriate corrections to the given values based on the passed in texture ID/material.

It should work for textures from render.getTextureID() and any existing static materials (without needing to be in a render hook), and will be available after the next restart.
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
UV issue in drawTexturedRect - by Tomeno - 11-07-2020, 11:03 PM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 09:53 AM
RE: UV issue in drawTexturedRect - by Tomeno - 12-07-2020, 10:13 AM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 10:39 AM
RE: UV issue in drawTexturedRect - by Tomeno - 12-07-2020, 10:43 AM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 10:48 AM
RE: UV issue in drawTexturedRect - by Tomeno - 12-07-2020, 10:53 AM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 11:08 AM
RE: UV issue in drawTexturedRect - by Tomeno - 12-07-2020, 01:22 PM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 01:35 PM
RE: UV issue in drawTexturedRect - by Tomeno - 12-07-2020, 02:04 PM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 02:19 PM
RE: UV issue in drawTexturedRect - by Tomeno - 12-07-2020, 02:48 PM
RE: UV issue in drawTexturedRect - by Person8880 - 12-07-2020, 02:51 PM

  • View a Printable Version
Forum Jump:


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

Powered By MyBB, © 2002-2026 MyBB Group.