Directx
Wiadmości związane z tematem 'Directx'
Błąd w 64-bitowych Windows 7 i Windows Server 2008 R2 Microsoft ostrzega przed błędem występującym w 64-bitowych wersjach Windows 7 oraz Windows Server 2008 R2.
Dziurę znaleziono w sterowniku Canonical Display Driver (cdd.dll), który wykorzystuje GDI oraz DirectX do wyświetlania pulpitu. Nieprawidłowo parsuje on dane przekazywane z trybu użytkownika do trybu jądra. Atakujący może wykorzystać dziurę do zawieszenia i restartu systemu. W tym celu...
10-05-19 dobreprogramy.pl
AMD sprzedało 6 milionów kart z DirectX 11 Firma AMD poinformowała, że w ciągu ostatnich dwóch kwartałów zdołała sprzedaż już ponad 6 milionów kart graficznych z obsługą bibliotek DirectX w wersji 11, z ...
10-04-16 TwojePC.pl
Dwa miliony GPU z DX11 Karty z obsługą bibliotek DirectX w wersji 11 przekroczyły liczbę 2 milionów egzemplarzy w trzy miesiące od pojawienia się pierwszego egzemplarza. Jest to ogrom...
10-01-07 TwojePC.pl
Windows 7 RTM już po polsku Dostępny od kilku dni Windows 7 RTM doczekał się także polskiej wersji językowej. Dodatkowo ogłoszona została umowa pomiędzy Microsoftem a AMD, która ma na celu zmaksymalizowanie wykorzystania najnowszej wersji biblioteki DirectX.
09-08-11 dziennik internautów
Krytyczna dziura w DirectX Wykryto groźną lukę w bibliotekach DirectX. Umożliwia ona atakującemu wykonanie dowolnego kodu na komputerze ofiary i jest już wykorzystywana przez twórców szkodliwego oprogramowania.Dziurę można wykorzystać za pomocą odpowiednio spreparowanego pliku QuickTime, umieszczonego na stronie internetowej. Jeśli ofiara wejdzie na taką stronę a jej przeglądarka otwiera filmy QT, wówczas dojdzie do wykonania ...
09-05-29 dobreprogramy.pl
[PL] Shadery w WPF – moje pierwsze podejście Artur Żarski u mnie w firmie, od jakiegoś czasu, a dokładniej odkąd zobaczył moje zabawy z Xna męczył mnie abym napisał Shader do WPF. W końcu znalazłem chwilkę. Przy okazji zabawy obaliłem jedną tezę opublikowaną na poniższym blogu: http://blogs.msdn.com/greg_schechter/archive/2008/09/16/introducing-multi-input-shader-effects.aspx Co prawda nie mam takiego ładnego bindowania, ale wiele inputów (samplerów) jestem w stanie dołożyć już teraz. No ale do dzieła. Założyłem sobie dwa projekty, jeden z aplikacją WPF, drugi z biblioteką Shaderów. Finalnie wygląda to tak:
Na swoim oknie w WPF osadziłem jedną z kontrolek WPFKit czyli kalendarz, w Visual Studio wygląda to następująco: Nic wielkiego, ale podobnie jak na wymienionym wyżej blogu w Xaml dodałem sobie dodatkowy obrazek:
Mój phong.jpg wygląda dokładnie tak: W kodzie mojego okna dodałem jeszcze obsługę mojego Shadera:
InversePhongShader inversePhongEffect;
public EffectWindow() { InitializeComponent();
inversePhongEffect = new InversePhongShader(); inversePhongEffect.Input2 = (Brush)Resources["phongMap"]; calendar1.Effect = inversePhongEffect; calendar1.MouseMove += new MouseEventHandler(calendar1_MouseMove);
}
void calendar1_MouseMove(object sender, MouseEventArgs e) { Point mP = e.GetPosition(calendar1); mP.X/=calendar1.ActualWidth; mP.Y/=calendar1.ActualHeight; inversePhongEffect.MousePosition = mP;
}Co tutaj się wydarzyło? Stworzyłem instancję swojego Effektu (Shadera), który opiszę później. Linijkę niżej dodałem drugi Input w postaci właśnie wymienionego wyżej JPG. Greg Schechter obiecuje, że w RTM będzie się dało ładnie takie parametry bindować w Xamlu, ja niestety sposiłkowałem się kodem. (ale działa już teraz!) Podpiąłem też zdarzenie generowane, gdy mysz będzie poruszana na kontrolce kalendarza. Bedzie mi to potrzebne w shaderze, gdyż to co ma on robić to Odwracać kolorystykę oryginalnej kontrolki, tak żeby była ciemna nie jasna (Inverse) oraz żeby dodawał efekt światełka z latarki w miejscu gdzie jest kursor myszy. Zdarzenie przekazuje parametry związane z pozycją myszy. Jest tam wykonane dodatkowe dzielenie ponieważ shader rozumie współrzędne w skali 0.0-1.0 a nie w pixlach. Aby te parametry (MousePosition, dodatkowy Sampler) zadziałały potrzebna była jeszcze modyfikacja w kodzie klasy efektu: public class InversePhongShader : ShaderEffect {
…
public InversePhongShader() { this.PixelShader = _pixelShader;
UpdateShaderValue(InputProperty); UpdateShaderValue(Input2Property); UpdateShaderValue(MousePositionProperty); }
public Brush Input { get { return (Brush)GetValue(InputProperty); } set { SetValue(InputProperty, value); } }
public Brush Input2 { get { return (Brush)GetValue(Input2Property); } set { SetValue(Input2Property, value); } }
public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(InversePhongShader), 0);
public static readonly DependencyProperty Input2Property = ShaderEffect.RegisterPixelShaderSamplerProperty("Input2", typeof(InversePhongShader), 1);
public Point MousePosition { get { return (Point)GetValue(MousePositionProperty); } set { SetValue(MousePositionProperty, value); } }
public static readonly DependencyProperty MousePositionProperty = DependencyProperty.Register("MousePosition", typeof(Point), typeof(InversePhongShader), new UIPropertyMetadata(new Point(.5,.5), PixelShaderConstantCallback(0))); … }
Potem już tylko Pixel Shader w HLSL:
//----------------------------------------------------------------------------------------- // Shader constant register mappings (scalars - float, double, Point, Color, Point3D, etc.) //-----------------------------------------------------------------------------------------
float2 mousePosition : register(C0);
//-------------------------------------------------------------------------------------- // Sampler Inputs (Brushes, including ImplicitInput) //--------------------------------------------------------------------------------------
sampler2D implicitInputSampler : register(S0); sampler2D phongMapSampler : register(S1);
//-------------------------------------------------------------------------------------- // Pixel Shader //--------------------------------------------------------------------------------------
float4 main(float2 uv : TEXCOORD) : COLOR { float4 color = 1 - tex2D(implicitInputSampler, uv); float4 colorPhong; float2 phongUV = mousePosition; float dist = length(phongUV-uv); if (dist>.3) { colorPhong = (0,0,0,0); color/=4;// colorPhong; } else { colorPhong = tex2D(phongMapSampler, (.5+dist)); color = color + colorPhong*(1.0-dist*2); }
color.a=1.0; return color; }
I taki mam efekt, gdy uruchomię swoją aplikację: Oczywiście jak ruszam mychą to światełko za nią podąża.
Technorati Tags: Polish posts,WPF,coding,DirectX
08-12-19 msdn - danieb
Warning: fopen(seodisti3/129.dat) [function.fopen]: failed to open stream: No such file or directory in /seodisti3.php on line 36
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fclose(): supplied argument is not a valid stream resource in /seodisti3.php on line 42
Warning: fopen(seodisti3/143.dat) [function.fopen]: failed to open stream: No such file or directory in /seodisti3.php on line 36
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fgets(): supplied argument is not a valid stream resource in /seodisti3.php on line 40
Warning: fclose(): supplied argument is not a valid stream resource in /seodisti3.php on line 42