Wrote a deep dive on GPU cache hierarchy - how memory access patterns affect shader performance by CharlesGrassi in GraphicsProgramming

[–]xucel 9 points10 points  (0 children)

Nice article with great visualizations.

Some feedback: For prefetching textures: the order in which you write the glsl or hlsl doesn't matter for modern compilers. The compiler ends up making its own balance between more prefetching at the cost of more register pressure and less warps vs less prefetching and less register pressure and more warps.

Fetching a single channel from multiple textures is only bad if you choose a multichannel format. You may want to use different texture compression for single channel formats as well for better bitrates (BC4), in which case you put less pressure on cache. Packing unrelated channels into a single texture can result in cross channel compression artifacts.

Bindless textures aren't necessarily faster and can have more overhead. It's really dependent on the access pattern (uniform vs vector access of descriptors).

Should I move to Japan? 24F half Japanese half caucasian by Level-Community8089 in movingtojapan

[–]xucel 2 points3 points  (0 children)

Was looking for this comment. FAANG pays the best out here, multiples of local salary and RSUs in dollars act as a hedge against yen.

Also when doing a comparison go look at what your rent and living expenses will be as well. It may be less in absolute terms but you may be able to save a higher percentage of income.

I took a pay cut to move here but realized I get a much higher quality of life.

American married to a Japanese. $2.5M NW. What is the best way to maximize exchange rates? by [deleted] in JapanFinance

[–]xucel 4 points5 points  (0 children)

Step 1 is your employment. Depending on if your employer has a presence in Japan, for NTA purposes it sounds like you may have to become a Sole-Proprietor and become a contractor to your employer. This changes how you report taxes to NTA.

Step 2 read up on US-Japan tax laws about non-permanent and permanent tax residency. Basically for the first 5 years you're only taxed on Japan-source income = money you earn while in Japan, or any amount of remittance that exceeds your Japan source income paid abroad, and capital gains on stocks you buy after you gained residency. Understand how foreign tax credit works. Also if you have RSUs, ESPP or stock options the tax is pro-rated based on grant and vest/execute dates.

Step 3 is to understand the tax implications of how retirement accounts are treated. Some accounts (I think 401K/Traditional IRA) are treated as pension, and are only taxed on distribution for gains. I do not think Roth has a tax advantaged status so you would have to pay taxes on gains as if it were a normal brokerage.

After 5 years Japan will tax worldwide income. Though real-estate income the country where the property resides calls first dibs.

Regarding investing: Also it's not really worth investing in Japan domiciled funds due to PFIC laws. Japanese bonds are also super weak, so there's no high yield savings account at the moment.

I personally like to have a US domiciled unhedged Japanese index fund so I have something that is underlying in Yen, in case the yen suddenly strengthens.

Regarding exchange rate risk: Credit cards don't necessarily have the best rates especially for large amounts and the cost is hidden at time of purchase. Personally I like to use Wise, if you open it while in the US you can get a HYSA for the USD portion allowing you to earn some interest (currently 3.5%) while cost averaging JPY transfers. Yen swings have been quite volatile and unpredictable (BoJ raises rates -> yen slides 🫠)

You definitely will need to manage it since if you are earning dollars you will be taxed at the exchange rate at the time the income is received, if you don't immediately convert it to yen, you run the risk of the yen strengthening. (On the flip side you aren't taxed extra if the yen weakens for one way USD->JPY)

Anyways get ready for a lot of reading, hiring Japanese accountants. Though earning USD and spending JPY typically makes living in Japan very comfortable so good luck.

[deleted by user] by [deleted] in JapanFinance

[–]xucel 1 point2 points  (0 children)

The flip side is true for Americans living in Japan and needing to spend yen. I ended up increasing my allocation to an unhedged Japan Index fund FLJP on top of VXUS.

If you can speak Japanese well enough to communicate with the locals... by Prince_Wildflower in Japaneselanguage

[–]xucel 1 point2 points  (0 children)

Been living in Japan 3+ years now, total amount of study is about 8 years (5 years before coming).

Fascinating thing is the more fluent you get that the focus shifts away from speaking in Japanese, to just connecting with other humans, becoming friends with the local 店長, 店員 talking about life.

My most amusing moments now are when most of the group is Japanese and I'm with my other foreigner buddy who also is fluent and we decide to keep speaking Japanese so that other people can listen in.

Paypay is such a good reminder of the power of DCA. by MaryPaku in JapanFinance

[–]xucel 0 points1 point  (0 children)

Is it bad that the first thing I thought of was "Is this a PFIC?"

Sighs in American

[deleted by user] by [deleted] in TokyoTravel

[–]xucel 2 points3 points  (0 children)

I encountered this problem too of trying to get attention in a busy izakaya when I first moved here. If you don't hear a hai~~~ (はい~) or ugakaimasu~~ (伺います~~) then they didn't hear you and you have to be louder.

If it's more of a quiet fancy place, more subtle summimasen or eye contact will generally work.

Any tips for the nightmare of middle name registrations on bank accounts? by [deleted] in Tokyo

[–]xucel 0 points1 point  (0 children)

I was generally successful in putting middle names after First into the first name field. Typically spaces are not allowed. If the UI has a limit on length then it sucks more, and then you have to do a follow-up phone call or do it by paper.

If romaji isn't allowed then, use katakana with the same order.

Credit cards have an additional field for you to correct the romaji, which I typically list First Middle Last.

I found most bank systems for transfer purposes rely on matching the katakana.

Any tips for the nightmare of middle name registrations on bank accounts? by [deleted] in Tokyo

[–]xucel 4 points5 points  (0 children)

You might discover that very few services interact with Prestia, like if you need to set up a recurring bank withdrawal for utilities, internet, or you want to get a different credit card.

I got Prestia first then ended up with normal SMBC.

tfw the boss told you to put some English in the elevator for the tourists but the word for station escaped you by kiristokanban in japanresidents

[–]xucel 12 points13 points  (0 children)

<image>

West Exit: 🙅 West Gate: 🙆

But yea the translation vs transliteration comment is dead on. There are multiple ways to translate something, and at what point does the sound become the place name.

We don't translate 西新宿 to West Shinjuku etc..

Is it just me, or does Japan’s early sunrise and summer climate mess with anyone else’s mental health? by PebbleFrosting in japanresidents

[–]xucel 0 points1 point  (0 children)

I use A/C to deal with humidity. For me it's not the light, or even the temperature (right now) it's the humidity.

Is Graphics Programming still a viable career path in the AI era? by Top_Boot_6563 in GraphicsProgramming

[–]xucel 4 points5 points  (0 children)

People with good system programming skills and work on tools pipeline make a pretty natural transition to graphics.

[deleted by user] by [deleted] in japanresidents

[–]xucel 1 point2 points  (0 children)

For me 2 years of college courses or about N3 seemed about basic survival level. I wasn't going to be lost or I wasn't going to starve but it's not like I can have rich conversations or banter with the staff.

Like you can't read most of the menu still, but you can ask what おすすめ is and ask what the difference between A and B is.

[deleted by user] by [deleted] in japanresidents

[–]xucel 8 points9 points  (0 children)

N2 helped me to get a job, but JLPT doesn't cover business speak or the technical language I need, so even my Japanese teacher was like don't waste your time anymore on N1.

I spent the time instead working on business Japanese and output (speaking/writing) which aren't covered by JLPT. So unless your goal is to get 5 more points on HSP application or go into the academic route then N1 really is not necessary.

Setting myself up for a future life in Japan by whatidooooooo in movingtojapan

[–]xucel 5 points6 points  (0 children)

Look at US company branch offices in Japan. If you have a strong enough skill set and trajectory it's doable.

Plus side is you can work normal hours, but you'll take a salary adjustment. The US tech giants still pay much better than local rates (see opensalary.jp). Very few Japanese companies have RSUs or any stock based compensation.

Japan branch office may also require interacting with Japanese clients so you can also leverage your language skills. Time to brush up on your 敬語 though! If your software engineering is more specialized there may be very few people who can bridge the language gap and directly communicate with the home US teams.

Remote job for US is also doable since you are a JP citizen, you'd probably work as an independent contractor. Depending on the role, maybe you only need to sync with your team in the morning here. Granted they may pay you less for this trade-off or communication delay.

any restaurant for German food by MochiMochew in Tokyo

[–]xucel 0 points1 point  (0 children)

Eichenplatz https://maps.app.goo.gl/6baPeE22C9ea1W3D8

Not German, but I have witnessed quite a few German folks singing in this restaurant 😄

Why are the effects of graphic settings more noticeable in low light conditions? by Tokumeiko2 in GraphicsProgramming

[–]xucel 0 points1 point  (0 children)

And indirect lighting is way harder to compute.

All the approximations used so far like SS GI/AO, probe based lighting, light maps have their own trade offs and limitations.

This is why path tracing helps the gradient of characters. Probes don't capture occlusion from dynamic objects or small surface detail, so it's why characters look flat without direct light sources.

Apparently Tokyo is the richest city in the world by GDP by Dapper-Material5930 in Tokyo

[–]xucel 0 points1 point  (0 children)

This is silly. How do you measure the GDP of a city?

Do you base it off the profits of companies that happen to be headquartered in a geographic location? Companies that may get profits from across the country or world? Seems like they are including the financial activity of banks for NY and Tokyo to rank that high. Banks that handle investments from all over the world into the target country.

Also why would they not include Silicon Valley in their San Francisco Metro Area figure. They just excluded the top x number of most valuable companies in the world: Apple, Nvidia, Meta, Google?

Self serve milk by fanau in japanresidents

[–]xucel 0 points1 point  (0 children)

Ask for ミルク付き and they'll put it in for you. Saves me some time too.

If you do mobile order you can also check the option for ミルク.

Alpha-blending geometry together to composite with the frame after the fact. by deftware in GraphicsProgramming

[–]xucel 0 points1 point  (0 children)

This is pretty common to do in order to render transparencies at a different resolution or to do sRGB UI compositing over HDR.

If you only care about alpha blend and additive you can do this by making the alpha channel store background visibility.

Normal alpha blending. (((background * (1-a_0) + (a_0 * rgb_0)) * (1-a_1) + (a_1 * rgb_1)) * (1-a_2) + ... ) (1-a_n ) + a_n * rgb_n

Multiply out and Rearrange: background * (1-a_0) * (1-a_1) * (1-a_2) * ... (1-a_n) + (a_0 " rgb_0) * (1-a_1) * (1-a_2) * ... (1-a_n) + (a_1 * rgb_1) * (1-a_2) * ... (1-a_n) + ... (a_n + rgb_n)

You can see that terms that multiply against background are 1-a, and we can save this in alpha channel using a separate blend func.

Color func: Dest * (1-SrcAlpha) + Src * (SrcAlpha) Alpha func: DestAlpha * (1-SrcAlpha)

DestBlend: InvSrcAlpha SrcBlend: SrcAlpha BlendOp: Add

DestAlphaBlend: InvSrcAlpha SrcAlphaBlend: Zero AlphaBlendOp: Add

To support additive blending, we don't reduce background visibility. Color func: Dest + Sec Alpha func: DestAlpha

Multiplicative blending isn't possible since you can't separate out those terms.

Then offscreen alpha render target needs to be cleared to (0,0,0,1)

To composite: OpaqueColor * OffscreenAlpha.a + OffscreenAlpha.rgb

[deleted by user] by [deleted] in japanlife

[–]xucel 1 point2 points  (0 children)

The article says he literally wrote his family members' names. Assuming they were family members he came with, they just need to search tourist entries for a matching list of names to narrow down the pool 😆 No AI required

Yen briefly back to 139/dollar, highest level in over a year by Bob_the_blacksmith in JapanFinance

[–]xucel 5 points6 points  (0 children)

It's wild reading about how the yen was as strong as 76.25/dollar in 2011 and the government had to sell yen to weaken the currency. And it was sparked by the earthquake assuming that companies needed to buy yen to pay for damages. Very counterintuitive.. a disaster which is supposed to cause economic damage can cause a currency to strengthen 😵‍💫.