xna-4.0


Is there a Texture1D in XNA?


I need to pass an array of Vector3 or Vector4's to my pixel shader. Is there something like a one dimensional texture that I can set from the CPU and sample on the GPU?
No there is no built-in class that you can use, but you can create your own one (untested):
public class Texture1D
{
GraphicsDevice device;
Vector4[] pixels;
bool mipMap = false;
SurfaceFormat Format;
public Texture1D (GraphicsDevice Device, int Length)
{
pixels = new Vector4[Length];
device = Device;
Format = SurfaceFormat.Color;
}
public Texture1D (GraphicsDevice Device, int Length, bool mipMap, SurfaceFormat format)
{
pixels = new Vector4[Length];
device = Device;
this.mipMap = mipMap;
Format = format;
}
}

Related Links

Texture2D is way oversized in XNA 4.0?
How to set xna's TextureFilter to Point
Why doesnt my xna pixel shader turn this texture blue?
How to calibrate kinect skeleton data to video feed?
XNA game studio4.0 using c#
How to add collision detection in a 2D car game in XNA?
Texturing a terrain causes Windows Phone to crash (without an exception) or Models are not drawn afterwards
compiling and deploy window mobile phone platform games into xbox360 game platform with XNA 4.0
'Expected class, delegate, enum, interface,or struct' in XNA 4.0?
Having errors running JigLibX 0.3.1 on XNA 4.0
How to remove splash screen?
Layouting a row of bricks on the wall in XNA 4
Xbox 360 XNA HLS Streaming
XNA Reach profile
Stencil testing in XNA 4
What game engines are available for XNA 4.0?

Categories

HOME
cakephp
yii2
osgi
blogger
minimum-spanning-tree
mediawiki
hp-exstream
onedrive
octobercms
cakephp-2.5
webrequest
session-variables
spring-kafka
resize
google-apps-marketplace
gz
reactive-cocoa
jprofiler
chromium-embedded
realex-payments-api
h2db
applozic
saas
srcset
tinymce-4
data-manipulation
exuberant-ctags
typed.js
amazon-kinesis-kpl
overriding
angularjs-factory
azure-ml
awt
acoustics
sencha-touch-2.3
jedis
dropbox-php
mu
jspdf-autotable
specrun
word-vba-mac
time-and-attendance
url-pattern
savon
qpid
superstack
essence
ora-00900
spidermonkey
interrupted-exception
vstest.console.exe
oberon
typekit
java.util.concurrent
fpml
html-helper
mbr
industrial
prettify
flexmojos
eventual-consistency
robotics-studio
itmstransporter
ticoredatasync
netdna-api
whoosh
genshi
tomcat-valve
f#-powerpack
locationlistener
javax.script
locate
jmock
asp.net-mvc-areas
.nettiers
filtered-index
user-friendly
substrings
private-members

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App