Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
oh no blimp issue
Feb 23, 2011

i tried doing a home project once, but that's boring

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

i'm so stupid i've been trying to figure out perspective-correct texture mapping forever. i can't figure out where the Z fits into the formula. who's smarter than me and knows how to go from this working affine mapping function to perspective mapping?

code:
if((screen_x >= 0 && screen_x < SCREEN_WIDTH && screen_y >= 0 && screen_y < SCREEN_HEIGHT)){
                float z = triangle.solve_plane_for_z(Point(screen_x, screen_y));

                //texture: X = U, Y = V, Z = W.
                Vector3f barycentric = barycentric_point(screenPoints[0], screenPoints[1], screenPoints[2], Point(screen_x, screen_y));
                float w_prime = barycentric.x + barycentric.y + barycentric.z;
                int u_prime = (int)(((barycentric.x * triangle.texturePoints[0].x + barycentric.y * triangle.texturePoints[1].x + barycentric.z * triangle.texturePoints[2].x) / w_prime) * 256);
                int v_prime = (int)(((barycentric.x * triangle.texturePoints[0].y + barycentric.y * triangle.texturePoints[1].y + barycentric.z * triangle.texturePoints[2].y) / w_prime) * 256);
                color = checkerboardTexture[u_prime + (v_prime*256)];

                if(z < zbuffer[PIXEL_OFFSET(screen_x, screen_y)]){
                    assert(screen_x <= 319 && screen_y <= 199);
                    zbuffer[PIXEL_OFFSET(screen_x, screen_y)] = z;
                    setPixel(pixels, screen_x, screen_y, color);
                }
            }

hobbesmaster
Jan 28, 2008

triple sulk posted:

having a public display of your bad code beats out needing to do more bullshit in your spare time or dumb coding puzzles just to get to a second or third stage interview

those coding puzzles are easy though

triple sulk
Sep 17, 2014



hobbesmaster posted:

those coding puzzles are easy though

not if ur a terrible programmer

hobbesmaster
Jan 28, 2008

it's like always bsts, heaps or the simplest recursive/dynamic programming question (i.e. answer left+answer right or something)

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
anyone ever used nexus 3 as a nuget repo? ours is using like 99% cpu

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

uncurable mlady posted:

anyone ever used nexus 3 as a nuget repo? ours is using like 99% cpu

i used one as a nugent repo and the rock meter went up to 99

Uncle Enzo
Apr 28, 2008

I always wanted to be a Wizard
i don't "get" people griping about the gpl. like, what do you care how other people's code is licensed? you want to write some software that does a thing, go right ahead, no one is stopping you, open up notepad.exe and get started.

It's like complaining that you're not allowed to use microsoft's source code they wrote for edge. it's not yours, you have no right to it.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Luigi Thirty posted:

i'm so stupid i've been trying to figure out perspective-correct texture mapping forever. i can't figure out where the Z fits into the formula. who's smarter than me and knows how to go from this working affine mapping function to perspective mapping?

code:
if((screen_x >= 0 && screen_x < SCREEN_WIDTH && screen_y >= 0 && screen_y < SCREEN_HEIGHT)){
                float z = triangle.solve_plane_for_z(Point(screen_x, screen_y));

                //texture: X = U, Y = V, Z = W.
                Vector3f barycentric = barycentric_point(screenPoints[0], screenPoints[1], screenPoints[2], Point(screen_x, screen_y));
                float w_prime = barycentric.x + barycentric.y + barycentric.z;
                int u_prime = (int)(((barycentric.x * triangle.texturePoints[0].x + barycentric.y * triangle.texturePoints[1].x + barycentric.z * triangle.texturePoints[2].x) / w_prime) * 256);
                int v_prime = (int)(((barycentric.x * triangle.texturePoints[0].y + barycentric.y * triangle.texturePoints[1].y + barycentric.z * triangle.texturePoints[2].y) / w_prime) * 256);
                color = checkerboardTexture[u_prime + (v_prime*256)];

                if(z < zbuffer[PIXEL_OFFSET(screen_x, screen_y)]){
                    assert(screen_x <= 319 && screen_y <= 199);
                    zbuffer[PIXEL_OFFSET(screen_x, screen_y)] = z;
                    setPixel(pixels, screen_x, screen_y, color);
                }
            }

I have no idea but shouldn't w_prime be always 1 because that's the definition barycentric coordinates?

There Will Be Penalty
May 18, 2002

Makes a great pet!

NihilCredo posted:

hypothetically, if $corporation likes your gpl library and wants to use it in a closed-source project, you can offer to grant them a separate commercial license to the library for a price

$corporation can USE AND MODIFY your GPL library all they want for their internal applications. it's if they want to DISTRIBUTE their applications that they have to either distribute them under the GPL or get a separate commercial license from you.

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

fart simpson posted:

our solution is to just secretly use the gpl code anyway and blame "patent trolls" when we get sued

I've always thought someone should try dynamically linking to a full-GPL library and just have their installer download it separately.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

we actually did get sued last year for using gpl code in one of our products without following any of the rules at all. everyone at work was complaining about ip trolls and talking about how ridiculous it was but i was glad we got caught & sued

Progressive JPEG
Feb 19, 2003

was it busybox

ErIog
Jul 11, 2001

:nsacloud:

Symbolic Butt posted:

I have no idea but shouldn't w_prime be always 1 because that's the definition barycentric coordinates?

Barycentric just mean the coords are in relationship to the vertices of the triangle. It makes no assumptions about inside or outside. So w_prime could be anything depending on where the point is in relation to that triangle.

Also, due to floating point being an approximation, I doubt w_prime is actually 1.0 very often even for points that are definitely inside the triangle.

comedyblissoption
Mar 15, 2006

Luigi Thirty posted:

i'm so stupid i've been trying to figure out perspective-correct texture mapping forever. i can't figure out where the Z fits into the formula. who's smarter than me and knows how to go from this working affine mapping function to perspective mapping?

code:
if((screen_x >= 0 && screen_x < SCREEN_WIDTH && screen_y >= 0 && screen_y < SCREEN_HEIGHT)){
                float z = triangle.solve_plane_for_z(Point(screen_x, screen_y));

                //texture: X = U, Y = V, Z = W.
                Vector3f barycentric = barycentric_point(screenPoints[0], screenPoints[1], screenPoints[2], Point(screen_x, screen_y));
                float w_prime = barycentric.x + barycentric.y + barycentric.z;
                int u_prime = (int)(((barycentric.x * triangle.texturePoints[0].x + barycentric.y * triangle.texturePoints[1].x + barycentric.z * triangle.texturePoints[2].x) / w_prime) * 256);
                int v_prime = (int)(((barycentric.x * triangle.texturePoints[0].y + barycentric.y * triangle.texturePoints[1].y + barycentric.z * triangle.texturePoints[2].y) / w_prime) * 256);
                color = checkerboardTexture[u_prime + (v_prime*256)];

                if(z < zbuffer[PIXEL_OFFSET(screen_x, screen_y)]){
                    assert(screen_x <= 319 && screen_y <= 199);
                    zbuffer[PIXEL_OFFSET(screen_x, screen_y)] = z;
                    setPixel(pixels, screen_x, screen_y, color);
                }
            }
according to the tinyrenderer thing, to account for the perspective transform, you need to calculate the triangle's barycentric coordinates in clip space and then use those barycentric coordinates to interpolate textures for your fragments/pixels

don't use the screen space barycentric coordinates

https://github.com/ssloy/tinyrenderer/wiki/Technical-difficulties:-linear-interpolation-with-perspective-deformations

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
our internal SSO has been broken for 3 days and breaks at least once a week for a semi extended period of time in our dev environments.

the team that manages it doesnt seem to have any alerting or anything because every time it goes down i need to ping them in their channel and then they'll act like i'm stupid until someone realizes it's actually broken.

getting really goddamn frustrated.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

MALE SHOEGAZE posted:

our internal SSO has been broken for 3 days and breaks at least once a week for a semi extended period of time in our dev environments.

do you not just use Kerberos for single sign on

why the gently caress doesn't everyone just use Kerberos, it works

echinopsis
Apr 13, 2004

by Fluffdaddy

Luigi Thirty posted:

this is magic

sprite zooming in 1981 through voltage-controlled oscillators that generate sprite memory clocks at different speed lol

holy shjiot

Shaggar
Apr 26, 2006

eschaton posted:

do you not just use Kerberos for single sign on

why the gently caress doesn't everyone just use Kerberos, it works

internally everyone does use Kerberos, but externally you have to use SAML or ws-federation or, worst case, oauth2. and those are difficult for some types of people

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

eschaton posted:

do you not just use Kerberos for single sign on

why the gently caress doesn't everyone just use Kerberos, it works

Shaggar posted:

internally everyone does use Kerberos, but externally you have to use SAML or ws-federation or, worst case, oauth2. and those are difficult for some types of people

yeah sorry I wasn't clear. by 'internal' i meant 'our development instance of sso.' we of course use kerb for our internal sso.

it's kind of a tricky thing because of course the SSO team needs to have a development instance that they can test against, but if it goes down my team basically cant work. i can work around the outage in my dev environment but it also breaks other internal services i depend on, and i cant work around that. not always, anyhow, of course it depends on what i'm doing.

i'm rallying for some sort of 'dev sso environment that is only updated after sso changes have been pushed to production' but there's also the issue that sso sometimes goes down because its own dependencies are breaking, so all those people need to get on board too.


my boss has been talking to their manager to figure out wtf is going on but nothing useful has come from that yet

enterprise.

DONT THREAD ON ME fucked around with this message at 15:49 on Aug 8, 2016

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 🙏
Taco Defender
at my last job my boss said we should use kerberos for authentication of end users. I thought this was dumb as hell but implemented it anyway. this was dumb as hell, right?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Illusive gently caress Man posted:

at my last job my boss said we should use kerberos for authentication of end users. I thought this was dumb as hell but implemented it anyway. this was dumb as hell, right?

sounds weird af

Shaggar
Apr 26, 2006

MALE SHOEGAZE posted:

yeah sorry I wasn't clear. by 'internal' i meant 'our development instance of sso.' we of course use kerb for our internal sso.

it's kind of a tricky thing because of course the SSO team needs to have a development instance that they can test against, but if it goes down my team basically cant work. i can work around the outage in my dev environment but it also breaks other internal services i depend on, and i cant work around that. not always, anyhow, of course it depends on what i'm doing.

i'm rallying for some sort of 'dev sso environment that is only updated after sso changes have been pushed to production' but there's also the issue that sso sometimes goes down because its own dependencies are breaking, so all those people need to get on board too.


my boss has been talking to their manager to figure out wtf is going on but nothing useful has come from that yet

enterprise.

theres no reason for a separate dev Kerberos environment. just use your existing domain everywhere.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i have no idea how everything works. the thing that's broken is the service we use to generate an sso ticket for a user. whether this is actually connecting to a different sso environment is unknown / irrelevant to me.

Shaggar
Apr 26, 2006
ADFS?

HoboMan
Nov 4, 2010

i think i want to change my vs color scheme to one easier on the eyes. the default dark one seems kinda bad, can anyone recommend one?

Uncle Enzo
Apr 28, 2008

I always wanted to be a Wizard

HoboMan posted:

i think i want to change my vs color scheme to one easier on the eyes. the default dark one seems kinda bad, can anyone recommend one?

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Proportional fonts are easier on the eyes.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Jabor posted:

Proportional fonts are easier on the eyes.

oh not that again

Valeyard
Mar 30, 2012


Grimey Drawer

Awia posted:

i tried doing a home project once, but that's boring

the cloest i have got to coding outsside of work, since starting work, is: the yospos chrome extension, and some of those google foobar exercises

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
god drat there is nothing i love more than
JavaScript code:
Array.from(document.querySelectorAll('img.butt')).forEach((img) => img.style.width = '2000px')
when making greasemonkey scripts

i could probably just make "Array.from(document.querySelectorAll('')).forEach()" my new file template, since that's like 90% of the work done right there.

thanks, es6.
thes6

HoboMan
Nov 4, 2010

Wheany posted:

god drat there is nothing i love more than
JavaScript code:
Array.from(document.querySelectorAll('img.butt')).forEach((img) => img.style.width = '2000px')
when making greasemonkey scripts

i could probably just make "Array.from(document.querySelectorAll('')).forEach()" my new file template, since that's like 90% of the work done right there.

thanks, es6.
thes6

i hope you properly licenced this script b4 releasing it just now, because i'm stealing it

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Mr Dog posted:

C didn't actually have a built-in boolean type until the first big language revision in 1999. Even then you had to specifically ask for that type to be defined, also Microsoft until very recently was a total rear end in a top hat with regards to C, their policy being "C is an obsolete language, if you want any language features that weren't in the 1989 standard then compile your code as C++ instead"
the thing that finally made them back down on this and add support for most of c99 was the wonderfully terribly c99-to-c89, which somehow progressed from a dumb joke to a lovely perl script to a clang-based tool that google actually used in production for building chrome on windows

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Plorkyeran posted:

the thing that finally made them back down on this and add support for most of c99 was the wonderfully terribly c99-to-c89, which somehow progressed from a dumb joke to a lovely perl script to a clang-based tool that google actually used in production for building chrome on windows

https://www.youtube.com/watch?v=6bOy3RNyWME

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

HoboMan posted:

i hope you properly licenced this script b4 releasing it just now, because i'm stealing it

noo, i wanted to keep using it!

oh well, i guess it's back to using
Array.prototype.forEach.call(document.querySelectorAll('img.butt'), function (img) {img.style.width = '2000px'})
for me...

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

HoboMan posted:

i think i want to change my vs color scheme to one easier on the eyes. the default dark one seems kinda bad, can anyone recommend one?

claudia IDE plugin

Bloody
Mar 3, 2013

HoboMan posted:

i think i want to change my vs color scheme to one easier on the eyes. the default dark one seems kinda bad, can anyone recommend one?

the default blue one

Sapozhnik
Jan 2, 2005

Nap Ghost

Plorkyeran posted:

the thing that finally made them back down on this and add support for most of c99 was the wonderfully terribly c99-to-c89, which somehow progressed from a dumb joke to a lovely perl script to a clang-based tool that google actually used in production for building chrome on windows

should have just used mingw t.b.h.

windows deserves nothing more than to be treated as a garbage legacy embedded platform to be cross-compiled for and whose stench is to be held at arm's length

Bloody
Mar 3, 2013

actually windows is really good

Adbot
ADBOT LOVES YOU

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

windows is the least worst operating system

  • Locked thread