久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

沒有 box2d 的 Libgdx 燈

Libgdx light without box2d(沒有 box2d 的 Libgdx 燈)
本文介紹了沒有 box2d 的 Libgdx 燈的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我剛開始使用 libgdx 創(chuàng)建游戲.這是一個使用scene2d ui的自上而下的2d射擊游戲.現(xiàn)在我想,我可以為某些級別添加黑暗和光明,但我不想使用 box2d 重寫所有內(nèi)容.我不需要逼真的陰影,只需要某種環(huán)境光和圍繞我的角色的光環(huán),它不受墻壁和他周圍其他障礙物的影響.所以我想知道libgdx中是否有任何類型的光系統(tǒng)?或者我可以在不使用 box2d 身體/世界的情況下使用 box2dlights 嗎?謝謝

I just started creating a game using libgdx. It is a top down 2d shooter using scene2d ui. Now i thought, that i could add darkness and light to some levels, but i don't want to rewrite everything using box2d. I don't need realistic shadows just some kind of ambient light and a lightcircle arround my character, which is not affected by walls and other obstacles arround him. So i wanted to know if there is any kind of lightsystem in libgdx? Or can i use box2dlights without using box2d bodies/world...? Thanks

推薦答案

不幸的是,LibGDX 已經(jīng)沒有提供類似的東西了.

Unfortunately there is nothing like this already provided by LibGDX.

但如果你不想要陰影,你可以自己輕松地做到這一點.

But you can easily do it yourself if you do not want shadows.

這里是一個通過 LibGDX 完成的小視頻.這里是文章到這個視頻,帶有代碼和描述以及提供的所有內(nèi)容.您可以使用著色器以這種方式執(zhí)行此操作,但您也可以通過將光照貼圖渲染到 FBO 來執(zhí)行相同操作(在給定的鏈接中您可以看到如何執(zhí)行此操作),然后以通常的方式渲染它,并在頂部激活混合你的屏幕.標準的 SpriteBatch 可以做到這一點,您不需要任何自定義著色器.

Here is a little video of someone who has done it via LibGDX. Here is the article to this video, with code and descriptions and everything provided. You can do it this way with shaders, but you could also do the same by just rendering a lightmap to an FBO (in the given links you can see how to do that) and then just render it the usual way with blending activated on top of your screen. The standard SpriteBatch can do that and you don't need any custom shaders.

如果你仍然想要有障礙物的真實陰影,你可能會發(fā)現(xiàn) 這篇 文章非常有用.但這要慢得多,并且需要特殊的著色器.

If you still want to have real shadows with obstacles, you will probably find this article very useful. But this is a lot slower and needs special shaders.

順便說一句,沒有 Box2D 也無法使用 Box2dLights.

There is also no way to use Box2dLights without Box2D btw.

這篇關(guān)于沒有 box2d 的 Libgdx 燈的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Parsing an ISO 8601 string local date-time as if in UTC(解析 ISO 8601 字符串本地日期時間,就像在 UTC 中一樣)
How to convert Gregorian string to Gregorian Calendar?(如何將公歷字符串轉(zhuǎn)換為公歷?)
Java: What/where are the maximum and minimum values of a GregorianCalendar?(Java:GregorianCalendar 的最大值和最小值是什么/在哪里?)
Calendar to Date conversion for dates before 15 Oct 1582. Gregorian to Julian calendar switch(1582 年 10 月 15 日之前日期的日歷到日期轉(zhuǎn)換.公歷到儒略歷切換)
java Calendar setFirstDayOfWeek not working(java日歷setFirstDayOfWeek不起作用)
Java: getting current Day of the Week value(Java:獲取當前星期幾的值)
主站蜘蛛池模板: 精品久久久久久久 | 欧美电影在线观看网站 | www.亚洲精品 | 婷婷精品 | 精品国产一区二区三区久久狼黑人 | 9久9久9久女女女九九九一九 | 在线观看成人小视频 | 久久tv在线观看 | 91精品国产一区二区三区 | 久久精品一二三影院 | 亚洲欧洲国产视频 | 在线观看成人小视频 | 国产精品成人一区二区 | 伊色综合久久之综合久久 | 人人草人人干 | 成人一区二 | 欧美一区二区三区在线观看视频 | 亚洲夜射| 久久精品这里 | 国产精品一区二区无线 | 精品国产乱码一区二区三区a | 成人精品免费视频 | 亚洲毛片在线观看 | 色婷婷国产精品综合在线观看 | 日本不卡高字幕在线2019 | 欧美精品一区二区三区蜜桃视频 | 91精品国模一区二区三区 | 99久久精品国产麻豆演员表 | 狠狠入ady亚洲精品经典电影 | 久久久国产精品 | 日韩中文字幕一区二区 | 日韩一区精品 | 欧美 日韩 亚洲91麻豆精品 | 久久久成 | 给我免费的视频在线观看 | 久久久久国产成人精品亚洲午夜 | 日一区二区 | 精品久久久久久亚洲国产800 | 欧美日韩一区二区在线 | 亚洲一级视频在线 | 国产精品视频在线观看 |