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 »
Stencil bug with render.drawFilledCircle()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Stencil bug with render.drawFilledCircle()
18-04-2020, 03:01 AM,
#1
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
Stencil bug with render.drawFilledCircle()
The stencil function has a problem related to render.drawFilledCircle(), instead of limiting drawing to the circle, it limits it to its bounding box.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
18-04-2020, 10:29 AM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Stencil bug with render.drawFilledCircle()
This will be fixed after the next restart.
Find
Reply
13-06-2020, 09:54 PM,
#3
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Stencil bug with render.drawFilledCircle()
I noticed a new problem related to that one case, if on a screen, we try to draw a hollow circle using stencils and alpha 1 filled circle, the stencil would not take in acount the circle itself.
When increasing alpha to a certain number it does draw the inner filled circle but as full opacity.

render.startStencil()
render.setColor(0,0,0,1)
render.drawFilledCircle(862.3015,256.1455,64.5005,64.5005)
render.drawStencil()
render.cutOutStencil()
render.setColor(35,47,55)
render.drawFilledCircle(862.3015,256.1455,91.0105)
render.endStencil()

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
14-06-2020, 09:44 AM,
#4
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: Stencil bug with render.drawFilledCircle()
Yes, this is a limitation with the way the circle is being rendered, as noted in the documentation.

If you want translucency, you'll need to render the translucent circle in the draw part of the stencil, rather than the stencil part.

If you're just trying to make the stencil part not draw anything visible, you can disable colour writing, e.g.
render.startStencil()

-- Use 255 alpha to ensure the circle is actually "drawn". Even though it won't end up visible, alpha is still used.
render.setColor(0,0,0,255)

-- Stop writing colour so this circle is not visible, but still gets applied as a stencil.
render.enableColor(false)

render.drawFilledCircle(862.3015,256.1455,64.5005,64.5005)

-- Re-enable colour and draw whatever else below.
render.enableColor(true)
render.cutOutStencil()

render.setColor(35,47,55)
render.drawFilledCircle(862.3015,256.1455,91.0105)

render.endStencil()
Find
Reply
14-06-2020, 09:59 PM,
#5
The17thDoctor Offline
TSCM Average Enjoyer
****
Posts: 1,100
Threads: 249
Joined: Oct 2015
RE: Stencil bug with render.drawFilledCircle()
Thanks for the tip, i'll remember that one.

The17thDoctor: Server take me to the most handsome person
srcds_linux: I cant send people to themselves...
Website Find
Reply
« Next Oldest | Next Newest »


  • 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.