on 30-04-2012 05:07 PM
某掲示板でスプライトを7800個描画するサンプルがアップロードされてますね。
http://uproda11.2ch-library.com/11346706.zip.shtml
↓多少バグってるみたいで修正が必要みたいですが。
vcgの宣言を2次元にして、
float2 in a_Position : POSITION,
掛け算のとこを修正して、
//v_Position = mul( a_Position, wvp);
v_Position = mul( float4(a_Position,0.0,1.0), wvp);
この修正でwin上では絵が出たよ。
あとバグ報告上がってます
>SetUniformValue( int index, Vector4[] value, int to, int from, int count );
>で16単位で描画したら3000ぐらいまでになったけど、この関数VITAとエミュで挙動が違う。
>VITAだとfromが0固定っぽいす。バグっす。
>次の最適化はフレームバッファの解像度と色数変更なんですがなんかバグってるっす。
>フォーラムで質問してる人がいるんで次のアプデまで保留っすかね。
02-05-2012 04:59 PM - edited 02-05-2012 05:00 PM
いわゆるインデクスパレットスキニングが動作しなくて難儀してました…。
Vita 側での Graphics.ShaderProgram.SetUniformValue( int index, Vector4[] value, int to, int from, int count ) の動作ですが、
頂点シェーダ側の uniform が float4[16] 以外だと止まってしまうようです。
現状だと
・頂点シェーダの uniform が float4[16] 固定
・to も from も 0
・count も 16
で動作するようです。
float4 が 16 個以上欲しいときは、頂点シェーダ上で 16 個毎の複数の配列に分けてあげると
とりあえずは Vita 上でも動作します。
# マトリクスなら、行や列毎に別配列にするとか…。
on 09-05-2013 05:29 PM
7800個表示するサンプルが欲しいんですが、リンク切れで入手できませんでした。
もし持ってたら提供してもらえませんか?DrawArrayでの描画性能が想像以上に悪くて、
改善策をいろいろ考えています。
on 10-05-2013 12:27 PM
on 10-05-2013 05:23 PM
こんにちは
http://community.eu.playstation.com/t5/Graphics/Tu
このスレッドを参考にして作ったサンプルです。
http://kie.nu/_gK
インデックスバッファを使うと、かなり速度が改善されようです。
3000スプライトは出てます。(バグってなかったらですが)
ソースはCompactIndexedSprite.csです。
ではでは。
on 10-05-2013 11:44 PM
こんにちは
http://kie.nu/_iR
サンプルを修正しました。
○スプライトは 16 x 16
・とりあえず基本的なスプライト(頂点はfloat)
count = 2500 fps = 59.68
count = 6000 fps = 31.68
SimpleIndexedSprite.cs
・頂点データをshortなどにして小さくした
count = 5500 fps = 60
count = 5600 fps = 59.42
count = 6000 fps = 56.73
CompactIndexedSpritecs
・positionとuvを一緒の属性に
count = 5500 fps = 60
count = 5700 fps = 59.2
count = 6000 fps = 57.31
PackedIndexedSprite.cs
・positionとuvを一緒の属性にして色は固定値
count = 6000 fps = 59.95
count = 7000 fps = 59.16
NoColorPackedIndexedSprite.cs
AppMain.csで動作を切り替えてください。
on 15-05-2013 03:08 PM
調査と情報ありがとうございます。
ファイル名をDLしようとおもったら自動削除されたようで、DLできませんでした…
on 15-05-2013 03:44 PM
on 17-05-2013 11:49 PM
きちんとDLできましたぁ!ありがとうございまーす!
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870